Skip to content

Add tip for trusted_proxies #12622

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
Nov 14, 2019
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
11 changes: 11 additions & 0 deletions deployment/proxies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,17 @@ 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.

.. tip::

In applications using :ref:`Symfony Flex <symfony-flex>` you can set the
TRUSTED_PROXIES env var:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to mergers ... do the following change while merging:

TRUSTED_PROXIES  ->  ``TRUSTED_PROXIES``


.. code-block:: bash

# .env
TRUSTED_PROXIES=127.0.0.1,REMOTE_ADDR


If you are also using a reverse proxy on top of your load balancer (e.g.
`CloudFront`_), calling ``$request->server->get('REMOTE_ADDR')`` won't be
enough, as it will only trust the node sitting directly above your application
Expand Down