bref icon indicating copy to clipboard operation
bref copied to clipboard

[Doc] Symfony trusted_proxies and trusted_headers config

Open pfazzi opened this issue 4 years ago • 1 comments

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?

pfazzi avatar Jan 04 '21 14:01 pfazzi

Hi! Yes, that would be very welcome!

mnapoli avatar Jan 15 '21 08:01 mnapoli

Documented here: https://bref.sh/docs/frameworks/symfony.html#trust-api-gateway

mnapoli avatar Dec 01 '22 17:12 mnapoli