symfony/symfony-standard — pull request #356 by neilferreira (2012-07-04 12:37:37+00:00)
Title: Added a commented out example of how to get $request to trust X_FORWARDE...

Added a commented out example of how to get $request to trust X_FORWARDED_FOR headers in getClientIp()

When deploying a site to cloud hosting behind a reverse proxy (or similar situations) it is required to update this flag in the config file. It is really not obvious on how to do so, as it is not mentioned in the Request class documentation (https://github.com/symfony/HttpFoundation/blob/master/Request.php#L447)

Having it in there at least makes it easier to find out how to switch across to trusting proxies when your site is all of a sudden behind a reverse proxy. It took me a good 30mins to an hour the first time to figure this out after digging around in the code.