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;