All visitors have Cloudflare IP's


#1

I’ve installed Piwik on its own domain, and I’m using the proxy tracker on my website. Both Piwik domain and my webpage are using Cloudflare to benefit from the CDN and SSL services.

I’ve added mod_cloudflare to apache on both servers, and added these three sections to config.ini.php as suggested on How do I configure Piwik when the server is installed behind a proxy? - Analytics Platform - Matomo :

proxy_client_headers[] = HTTP_X_FORWARDED_FOR
proxy_host_headers[] = HTTP_X_FORWARDED_HOST
proxy_client_headers[] = HTTP_CF_CONNECTING_IP
proxy_client_headers[] = HTTP_CLIENT_IP
assume_secure_protocol = 1
proxy_client_headers[] = "HTTP_CF_CONNECTING_IP"
reverse_proxy = 1

I have also modified the final line in my piwik.php proxy tracker:
return arrayValue($_SERVER, ‘HTTP_CF_CONNECTING_IP’);

Unfortunately, I’m still seeing Cloudflare IP’s for every visit. What do I need to change to correctly log visitor IP’s?