Skip to content

remove unsupported trusted header config values #15011

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions deployment/proxies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ and what headers your reverse proxy uses to send information:
trusted_headers: ['x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port']
// or, if your proxy instead uses the "Forwarded" header
trusted_headers: ['forwarded']
// or, if you're using a wellknown proxy
trusted_headers: [!php/const Symfony\\Component\\HttpFoundation\\Request::HEADER_X_FORWARDED_AWS_ELB]
trusted_headers: [!php/const Symfony\\Component\\HttpFoundation\\Request::HEADER_X_FORWARDED_TRAEFIK]

.. code-block:: xml

Expand Down Expand Up @@ -80,9 +77,6 @@ and what headers your reverse proxy uses to send information:
'trusted_headers' => ['x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port'],
// or, if your proxy instead uses the "Forwarded" header
'trusted_headers' => ['forwarded'],
// or, if you're using a wellknown proxy
'trusted_headers' => [Request::HEADER_X_FORWARDED_AWS_ELB],
'trusted_headers' => [Request::HEADER_X_FORWARDED_TRAEFIK],
]);

.. deprecated:: 5.2
Expand Down Expand Up @@ -135,9 +129,6 @@ In this case, you'll need to - *very carefully* - trust *all* proxies.
// run time by $_SERVER['REMOTE_ADDR'])
trusted_proxies: '127.0.0.1,REMOTE_ADDR'

// if you're using ELB, otherwise use another Request::HEADER-* constant
trusted_headers: [!php/const Symfony\\Component\\HttpFoundation\\Request::HEADER_X_FORWARDED_AWS_ELB, '!x-forwarded-host', '!x-forwarded-prefix']

That's it! It's critical that you prevent traffic from all non-trusted sources.
If you allow outside traffic, they could "spoof" their true IP address and
other information.
Expand Down