8000 Documented the new REMOTE_ADDR option · symfony/symfony-docs@c8e9ff5 · GitHub
[go: up one dir, main page]

Skip to content

Commit c8e9ff5

Browse files
javiereguiluzwouterj
authored andcommitted
Documented the new REMOTE_ADDR option
1 parent 60ed052 commit c8e9ff5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

deployment/proxies.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,18 @@ In this case, you'll need to - *very carefully* - trust *all* proxies.
6565

6666
// ...
6767
Request::setTrustedProxies(
68-
// trust *all* requests
69-
['127.0.0.1', $request->server->get('REMOTE_ADDR')],
68+
// trust *all* requests (the 'REMOTE_ADDR' string is replaced at
69+
// run time by $_SERVER['REMOTE_ADDR'])
70+
['127.0.0.1', 'REMOTE_ADDR'],
7071

7172
// if you're using ELB, otherwise use a constant from above
7273
Request::HEADER_X_FORWARDED_AWS_ELB
7374
);
7475

76+
.. versionadded:: 4.4
77+
78+
The support for the ``REMOTE_ADDR`` option was introduced in Symfony 4.4.
79+
7580
That's it! It's critical that you prevent traffic from all non-trusted sources.
7681
If you allow outside traffic, they could "spoof" their true IP address and
7782
other information.

0 commit comments

Comments
 (0)
0