feat(auth): add proxy support and pass ip/user-agent to login

- add ZEN_TRUST_PROXY env variable in .env.example for reverse proxy config
- replace getClientIp() with getIpFromHeaders() using next/headers for ip resolution
- forward ipAddress and userAgent to login action for session tracking
This commit is contained in:
2026-04-24 21:34:35 -04:00
parent f6f2938e3b
commit f46116394c
2 changed files with 7 additions and 3 deletions
+3
View File
@@ -10,6 +10,9 @@ ZEN_CURRENCY=CAD
ZEN_CURRENCY_SYMBOL=$
ZEN_SUPPORT_EMAIL=support@exemple.com
# PROXY (activer si derrière un reverse proxy)
ZEN_TRUST_PROXY=false
# DATABASE
ZEN_DATABASE_URL=postgres://USER:PASSWORD@HOST:PORT/postgres
ZEN_DATABASE_URL_DEV=postgres://USER:PASSWORD@HOST:PORT/postgres_dev