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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user