symfony/symfony — pull request #6146 by vrana (2012-11-29 04:46:51+00:00)
Title: Process X-Forwarded-For header in correct order

See http://en.wikipedia.org/wiki/X-Forwarded-For#Format. The IP addresses are appended to the right side so the server communicating with my managed proxy server is the last. This is the only value that can be trusted if I am behind managed proxy server, all others can be easily spoofed. The last value is also the equivalent of REMOTE_ADDR if I am not behind a reverse proxy.