fix: fix the geoip localhost hack

Signed-off-by: deslokitty <deslokitty@desloratadyna.net>
This commit is contained in:
2026-01-08 15:21:15 +01:00
parent a64cb5b4de
commit 38ed485bd8

View File

@@ -75,7 +75,7 @@ app.use((req, res, next) => {
});
app.use((req, res, next) => {
req.userId = verifyToken(req.cookies.token);
if (req.headers['x-forwarded-for']) return next();
if (!req.headers['x-forwarded-for']) return next();
const geo = geoip.lookup(req.headers['x-forwarded-for']);
console.log(geo);