Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 59e9f74

Browse filesBrowse 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
Copy full SHA for 59e9f74

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎cookbook/request/load_balancer_reverse_proxy.rst

Copy file name to clipboardExpand all lines: cookbook/request/load_balancer_reverse_proxy.rst
+1-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.