Compare commits

...

2 Commits

Author SHA256 Message Date
38ed485bd8 fix: fix the geoip localhost hack
Signed-off-by: deslokitty <deslokitty@desloratadyna.net>
2026-01-08 15:21:15 +01:00
a64cb5b4de 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>
2026-01-08 12:58:56 +01:00

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