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 <deslokitty@desloratadyna.net>
This commit is contained in:
2026-01-08 12:58:56 +01:00
parent 490c1cc724
commit a64cb5b4de

View File

@@ -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") {