Actions
Bug #5850
closedNew server - $_SERVER['REMOTE_ADDR'] using private IP instead of user IP
Start date:
2016-07-28
Due date:
% Done:
0%
Estimated time:
Deployment actions:
Description
I was testing bbPress on the new server and the IP address that is logged for each forum post uses a private IP address by the server, instead of the user's IP.
The issue is bbPress uses $_SERVER['REMOTE_ADDR']
to attempt to grab the user's IP. However, the load balancer uses $_SERVER['HTTP_X_FORWARDED_FOR']
.
I'm thinking we could override REMOTE_ADDR
with HTTP_X_FORWARDED_FOR
manually in wp-config.php as recommend in this WP Trac ticket:
https://core.trac.wordpress.org/ticket/9235#comment:12
https://core.trac.wordpress.org/ticket/9235#comment:40
Actions