Well, this mystery just keeps getting weirder and weirder doesn’t it?
Ok, I might’ve found a fix for this, could you try the following?
In the file host-analyticsjs-local/includes/api/class-proxy.php
on line 195 there’s a function called get_user_ip_address()
.
Replace that entire function (from private function get_user_ip_address() {
to the closing }
on line 212) with this:
private function get_user_ip_address()
{
if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {
$ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
} elseif (!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
if (is_array(explode(',', $ip))) {
$ip = explode(',', $ip);
return $ip[0];
}
return $ip;
}
This way, it’ll first look for a CloudFlare HTTP header. If that’s not present, it’ll continue its old flow.
Let me know how it goes!