From a64cb5b4de587095954adbb97a4d7e6ab65b092ab1fd463a9f7059a8b1d64b5b Mon Sep 17 00:00:00 2001 From: deslokitty Date: Thu, 8 Jan 2026 12:58:56 +0100 Subject: [PATCH] chore: replace amy's localhost hack ya so basically it is either reverse proxy or everyone gets access granted in shit yourself if you dont use a reverse proxy Signed-off-by: deslokitty --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index aa46412..b3cbdb4 100644 --- a/index.js +++ b/index.js @@ -75,10 +75,11 @@ app.use((req, res, next) => { }); app.use((req, res, next) => { req.userId = verifyToken(req.cookies.token); + if (req.headers['x-forwarded-for']) return next(); + const geo = geoip.lookup(req.headers['x-forwarded-for']); console.log(geo); - if (geo) if (geo.country !== "US") if (geo.country !== "UA") if (geo.country !== "PL") {