From bbc2f115e8e0626a1398d0ce4c212281c2b2281c Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 10 Aug 2014 14:38:14 +0200 Subject: [PATCH] fix code block Indent the complete block with three more spaces so that it is aligned properly inside the surrounding list item. Move placeholder comment to the right place. --- cookbook/request/load_balancer_reverse_proxy.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cookbook/request/load_balancer_reverse_proxy.rst b/cookbook/request/load_balancer_reverse_proxy.rst index deb4bc679bb..324cbd12838 100644 --- a/cookbook/request/load_balancer_reverse_proxy.rst +++ b/cookbook/request/load_balancer_reverse_proxy.rst @@ -81,13 +81,13 @@ In this case, you'll need to - *very carefully* - trust *all* proxies. proxies, configure Symfony to *always* trust incoming request. This is done inside of your front controller:: - // web/app.php - // ... + // web/app.php - Request::setTrustedProxies(array($request->server->get('REMOTE_ADDR'))); + // ... + Request::setTrustedProxies(array($request->server->get('REMOTE_ADDR'))); - $response = $kernel->handle($request); - // ... + $response = $kernel->handle($request); + // ... That's it! It's critical that you prevent traffic from all non-trusted sources. If you allow outside traffic, they could "spoof" their true IP address and