Skip to content

Commit dd88a33

Browse files
mcfedrOskarStark
authored andcommitted
Add tip for trusted_proxies
1 parent 5d8564e commit dd88a33

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
@@ -76,6 +76,17 @@ That's it! It's critical that you prevent traffic from all non-trusted sources.
7676
If you allow outside traffic, they could "spoof" their true IP address and
7777
other information.
7878

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

0 commit comments

Comments
 (0)