bref
bref copied to clipboard
[Doc] Symfony trusted_proxies and trusted_headers config
While deploying an app I noticed that Symfony router doesn't take into account schema and port of the current request in the URLs generation. This is due to the fact ApiGateway acts as a proxy, so this information is contained in x-forwarded headers. I fixed the issue by adding this config:
framework:
trusted_proxies: '127.0.0.1'
trusted_headers: ['x-forwarded-for', 'x-forwarded-proto', 'x-forwarded-port']
Does it make sense to include this detail in the documentation?
Hi! Yes, that would be very welcome!
Documented here: https://bref.sh/docs/frameworks/symfony.html#trust-api-gateway