diff --git a/docs/symfony/getting-started.mdx b/docs/symfony/getting-started.mdx index c367685a6..5a509fe2a 100644 --- a/docs/symfony/getting-started.mdx +++ b/docs/symfony/getting-started.mdx @@ -165,7 +165,7 @@ Add the following lines to `config/packages/framework.yaml`: ```yml filename="config/packages/framework.yaml" {2-5} framework: # trust the remote address because API Gateway has no fixed IP or CIDR range that we can target - trusted_proxies: '127.0.0.1' + trusted_proxies: '127.0.0.1, 0.0.0.0/0' # trust "X-Forwarded-*" headers coming from API Gateway trusted_headers: [ 'x-forwarded-for', 'x-forwarded-proto', 'x-forwarded-port' ] ``` diff --git a/docs/use-cases/websites.mdx b/docs/use-cases/websites.mdx index dbb8025f4..1a2f51829 100644 --- a/docs/use-cases/websites.mdx +++ b/docs/use-cases/websites.mdx @@ -94,6 +94,7 @@ serverless plugin install -n serverless-lift Because this construct sets the `X-Forwarded-Host` header by default, you should add it in your `trusted_headers` config, otherwise Symfony might generate wrong URLs. ```yml filename="config/packages/framework.yaml" /, 'x-forwarded-host'/ + trusted_proxies: '127.0.0.1, 0.0.0.0/0' trusted_headers: [ 'x-forwarded-for', 'x-forwarded-proto', 'x-forwarded-port', 'x-forwarded-host' ] ```