From ebdf182b00a61f3901c1df504d2e5e562d209780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20M=C3=B3ricz?= Date: Sun, 13 Apr 2025 23:26:57 -0700 Subject: [PATCH] feat(auth): more ip --- apps/api/src/controllers/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/controllers/auth.ts b/apps/api/src/controllers/auth.ts index 4ca3b967..b8063da2 100644 --- a/apps/api/src/controllers/auth.ts +++ b/apps/api/src/controllers/auth.ts @@ -393,7 +393,7 @@ export async function supaAuthenticateUser( }; } - const incomingIP = (req.headers["x-forwarded-for"] || + const incomingIP = (req.headers["x-preview-ip"] || req.headers["x-forwarded-for"] || req.socket.remoteAddress) as string; const iptoken = incomingIP + token;