[wp-trac] [WordPress Trac] #9235: Extract real IP behind a load balancer
WordPress Trac
noreply at wordpress.org
Sat Mar 8 13:18:19 UTC 2014
#9235: Extract real IP behind a load balancer
-------------------------------+-----------------------
Reporter: Denis-de-Bernardy | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone:
Component: Optimization | Version: 2.9
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-------------------------------+-----------------------
Changes (by peetaur):
* status: closed => reopened
* resolution: wontfix =>
Comment:
I have solved the problem of being server specific. I have added a patch
created with ideas from the above, plus an optional configuration setting.
Now you just set the PROXY_IP config setting to a space separated list of
proxies, and it will use HTTP_X_FORWARDED_FOR instead of REMOTE_ADDR it if
it is in PROXY_IP, and the HTTP_X_FORWARDED_FOR header is set and non-
empty.
I tested that the IP for the comment is correct when filled with my proxy
(127.0.0.1 which is my apache2), or with blank '' (the default in config-
sample.php), or with the PROXY_IP undefined (commented out).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/9235#comment:43>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list