10000 Merge branch '4.3' into 4.4 · symfony/symfony-docs@d3f812f · GitHub
[go: up one dir, main page]

Skip to content

Commit d3f812f

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: minor. refs #12622 Add tip for trusted_proxies
2 parents cb5c807 + 0199c26 commit d3f812f

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)
0