Answer the question
In order to leave comments, you need to log in
How to get the real IP of the visitor?
Hello everyone, I connected CloudFlare and it replaces users' IPs with their own.
I found a code on the Internet that supposedly should transmit a real IP, but CloudFlare seems to encrypt them.
if(isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
$_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
}
Answer the question
In order to leave comments, you need to log in
https://support.cloudflare.com/hc/en-us/articles/2...
nginx.org/en/docs/http/ngx_http_realip_module.html
https://community.cloudflare.com/t/how-to -track-ip...
https://support.cloudflare.com/hc/en-us/sections/2...
in short, set up nginx correctly, look at the forwarded header and see if you are reading ngix IP with your application
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question