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 9b2c9f4

Browse filesBrowse files
ruudkwouterj
authored andcommitted
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`
1 parent 536fa8a commit 9b2c9f4
Copy full SHA for 9b2c9f4

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.