HTTP_X_FORWARDED_FOR being ignored?
-
I recently improved my site by adding AutoScaling and HTTPS.
I am deploying on AWS, the load balancer acts as SSL termination and I’ve got a rewrite rule on my Apache config to redirect all traffic through HTTPS.
After doing this the settings page for ip geo block seems to ignore the option where I can set extra $_SERVER keys to retrieve IPs from. Previously, once I configured this setting to HTTP_X_FORWARDED_FOR the IP shown at the top of the settings page was properly set (or so I think) and I wouldn’t be locked out of the site. Now, even after configuring it, the server always displays $_SERVER[‘REMOTE_ADDR’] in the settings page and once I log out I’ll be locked out until I clear the caches.I’ve been struggling all day to get this fixed but I run out of ideas. I checked that the X-Forwarded-For header is properly set. Replacing $_SERVER[‘REMOTE_ADDR’] at runtime with $_SERVER[‘HTTP_X_FORWARDED_FOR’] shouldn’t be necessary and I’d would even argue is really bad practice.
What can I be doing wrong in this setup? Is it a bug on the plugin or is there anything I might be missing?
Thanks
The topic ‘HTTP_X_FORWARDED_FOR being ignored?’ is closed to new replies.