fix: trust Traefik reverse proxy so Symfony generates https:// redirects
CI / test (push) Has been cancelled
CI / test (push) Has been cancelled
Traefik terminates TLS and forwards X-Forwarded-Proto: https to Nginx, which forwards it to PHP-FPM. Without trusted_proxies, Symfony ignored this header and generated http:// redirect URLs after login/register, causing session cookie loss on mobile (Secure cookie not sent over HTTP). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,16 @@ framework:
|
|||||||
# Note that the session will be started ONLY if you read or write from it.
|
# Note that the session will be started ONLY if you read or write from it.
|
||||||
session: true
|
session: true
|
||||||
|
|
||||||
|
# Trust the Traefik reverse proxy that terminates TLS before Nginx.
|
||||||
|
# REMOTE_ADDR = trust whatever IP is connecting to PHP-FPM (always Nginx in Docker).
|
||||||
|
trusted_proxies: 'REMOTE_ADDR'
|
||||||
|
trusted_headers:
|
||||||
|
- 'x-forwarded-for'
|
||||||
|
- 'x-forwarded-host'
|
||||||
|
- 'x-forwarded-proto'
|
||||||
|
- 'x-forwarded-port'
|
||||||
|
- 'x-forwarded-prefix'
|
||||||
|
|
||||||
#esi: true
|
#esi: true
|
||||||
#fragments: true
|
#fragments: true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user