Cloudflare detect ip problem

Agentos

Active member
I have a problem with ip addresses on the page. Cloudflare IP appears on the IP address, but not on everyone. I had to ban several users and a problem arose because they had an IP cloude assigned.

I used this code and pasted into config.php, but it doesn't work.

PHP:
if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; }
 
The code you mentioned is potentially dangerous as there is no whitelisting of IPs.

What HTTPD are you using? Apache? Nginx? Check this page for how to configure your web server to correctly set the forwarded IP address, or you can try asking your host to set this up for you.
 
Back
Top Bottom