Skip to content

Commit d11dc82

Browse files
committed
minor #12622 Add tip for trusted_proxies (mcfedr)
This PR was submitted for the master branch but it was merged into the 4.3 branch instead (closes #12622). Discussion ---------- Add tip for trusted_proxies Continuing on from #12384, a quick tip to help the flex user Commits ------- dd88a33 Add tip for trusted_proxies
2 parents 5d8564e + dd88a33 commit d11dc82

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)