Skip to content

Commit 70e1d2c

Browse files
committed
Merge branch '4.4'
* 4.4: minor. refs #12622 Add tip for trusted_proxies
2 parents b3371f7 + d3f812f commit 70e1d2c

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

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

0 commit comments

Comments
 (0)