fix: fix the geoip localhost hack
Signed-off-by: deslokitty <deslokitty@desloratadyna.net>
This commit is contained in:
2
index.js
2
index.js
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user