I got requests from china,
The problem is that the req.url does not belong to my domain
Usually it is /
or /login
, etc
Was I hacked? I'd like to know a rationale for this
const logger = function (req, res, next) {
let { url, ip, method, statusCode } = req
console.log(`${moment().format("L - hh:mm:ss")} `.red + `${method} `.green + `From: ` + `${ip?.replace("::ffff:", "")?.replace("::1", "localhost")} (${geoip.lookup(ip)?.country || "No IP"})`.cyan + ` : ` + `${req.user?.id || null} `.yellow + `At: ` + `${url} `.cyan)
next()
}
app.use(logger)