Add Support for CloudFlare's CF-Connecting-IP Header for Checking IP Bans?
Posted: Mon Feb 06, 2017 9:23 pm
When submitting a ticket through a system that uses CloudFlare, the IP address ($_SERVER['REMOTE_ADDR']) returns the cloudflare IP that the user connected to and not the actual user's IP, unless their server has the mod_cloudflare Apache module installed. In order to adequately check to see if the user's IP is banned, HESK should check for the IP address returned from the CF-Connecting-IP HTTP header (if it exists), and then $_SERVER['REMOTE_ADDR'].
An alternative would be to instruct users to install the mod_cloudflare Apache module, however some shared hosts may not allow users to do this on their own.
An alternative would be to instruct users to install the mod_cloudflare Apache module, however some shared hosts may not allow users to do this on their own.