I have Cloudflare setup as a proxy for my site. On my site I put the following php code:
echo _SERVER['HTTP_CLIENT_IP']; echo _SERVER[‘HTTP_X_FORWARDED_FOR’];
For the first echo I get empty string (which is very strange)!!!
For the second I get my original client’s address (it’s ok, having in minde the proxy is on).
The question: Why I don’t see the Cloudflare’s address in the first echo?
Big picture is that I want to filter the trafic and allow only the trafic comming from the Cloudflare (maybe even in htaccess), but I can’t distinguish which one is direct, and which one i Cloudflare based on the my experiment.
Thanks in advance.