Skip to content

Commit c172f21

Browse files
committed
fix the trusted proxies configuration
1 parent 5641aa9 commit c172f21

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

deployment/proxies.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ and what headers your reverse proxy uses to send information:
3333
# ...
3434
// the IP address (or range) of your proxy
3535
trusted_proxies: '192.0.0.1,10.0.0.0/8'
36-
// trust *all* "X-Forwarded-*" headers (the ! prefix means to not trust those headers)
37-
trusted_headers: ['x-forwarded-all', '!x-forwarded-host', '!x-forwarded-prefix']
36+
// trust *all* "X-Forwarded-*" headers
37+
trusted_headers: ['x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port']
3838
// or, if your proxy instead uses the "Forwarded" header
39-
trusted_headers: ['forwarded', '!x-forwarded-host', '!x-forwarded-prefix']
39+
trusted_headers: ['forwarded']
4040
// or, if you're using a wellknown proxy
41-
trusted_headers: [!php/const Symfony\\Component\\HttpFoundation\\Request::HEADER_X_FORWARDED_AWS_ELB, '!x-forwarded-host', '!x-forwarded-prefix']
42-
trusted_headers: [!php/const Symfony\\Component\\HttpFoundation\\Request::HEADER_X_FORWARDED_TRAEFIK, '!x-forwarded-host', '!x-forwarded-prefix']
41+
trusted_headers: [!php/const Symfony\\Component\\HttpFoundation\\Request::HEADER_X_FORWARDED_AWS_ELB]
42+
trusted_headers: [!php/const Symfony\\Component\\HttpFoundation\\Request::HEADER_X_FORWARDED_TRAEFIK]
4343
4444
.. code-block:: xml
4545

0 commit comments

Comments
 (0)