File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff 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+
7580That's it! It's critical that you prevent traffic from all non-trusted sources.
7681If you allow outside traffic, they could "spoof" their true IP address and
7782other information.
You can’t perform that action at this time.
0 commit comments