8000 bug #5513 [load_balancer_reverse_proxy ] Always use 127.0.0.1 as a tr… · symfony/symfony-docs@59e9f74 · GitHub
[go: up one dir, main page]

Skip to content

Commit 59e9f74

Browse files
committed
bug #5513 [load_balancer_reverse_proxy ] Always use 127.0.0.1 as a trusted proxy (ruudk)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #5513). Discussion ---------- [load_balancer_reverse_proxy ] Always use 127.0.0.1 as a trusted proxy Apparently the behaviour changed in Symfony 2.7. Before, the solution just worked perfectly with a Amazon ELB. After upgrading to Symfony 2.7 the subrequests weren't trusted anymore because they set the `REMOTE_ADDR` to `127.0.0.1` Commits ------- 9b2c9f4 Always use 127.0.0.1 as a trusted proxy
2 parents 536fa8a + 9b2c9f4 commit 59e9f74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cookbook/request/load_balancer_reverse_proxy.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ In this case, you'll need to - *very carefully* - trust *all* proxies.
8383
// web/app.php
8484

8585
// ...
86-
Request::setTrustedProxies(array($request->server->get('REMOTE_ADDR')));
86+
Request::setTrustedProxies(array('127.0.0.1', $request->server->get('REMOTE_ADDR')));
8787

8888
$response = $kernel->handle($request);
8989
// ...

0 commit comments

Comments
 (0)
0