Skip to content

Commit 014bd29

Browse files
committed
Add tip for trusted_proxies
1 parent c0f24a3 commit 014bd29

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

deployment/proxies.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,17 @@ That's it! It's critical that you prevent traffic from all non-trusted sources.
8181
If you allow outside traffic, they could "spoof" their true IP address and
8282
other information.
8383

84+
.. tip::
85+
86+
In applications using :ref:`Symfony Flex <symfony-flex>` you can set the
87+
TRUSTED_PROXIES env var:
88+
89+
.. code-block:: bash
90+
91+
# .env
92+
TRUSTED_PROXIES=127.0.0.1,REMOTE_ADDR
93+
94+
8495
If you are also using a reverse proxy on top of your load balancer (e.g.
8596
`CloudFront`_), calling ``$request->server->get('REMOTE_ADDR')`` won't be
8697
enough, as it will only trust the node sitting directly above your application

0 commit comments

Comments
 (0)