Cloudflare confusing GEO location plugin for wordpress / woocommerce

A wordpress / woocommerce geo location plugin is not working as it should and the plugin developers have suggested that the issue might relate to Cloudflare. This is what they have said “Cloudflare seems to be sending an invalid value. It should be one value like 190.86.135.99 but Cloudflare is sending the IP twice separated with a comma. This is invalid and it breaks the geolocation, because we can’t geolocate an invalid IP”. They have copied this line of text as an example: [“HTTP CF CONNECTING IP”]=> string(28) “190.86.135.99, 190.86.135.99” and also this text: “REMOTE ADDR”=> string(28) "190.86.135.99, 190.86.135.99’. Is this something you can help me with please.

Hi,

The header cf-connecting-ip should only contain the visitor’s IP address, as documented.

If your server is passing it along as containing 2 IP addresses, that could mean either that this header is being transformed by a Transform Rule (I’m not sure if that’s possible), by a Cloudflare Workers, or that there was some misconfiguration in your server’s setup to restore visitor’s IP.

Check in your Cloudflare dashboard for possible Transform Rules and Workers that could be handling this header. If you do not find anything, check with your server admin or your hosting provider.

Thank you for reaching out. I have checked the rules as suggested however, there aren’t any rules set.

Thanks
Chris

Please ask your hosting provider or server admin to verify that whatever method they’ve implemented to restore original visitor’s IPs is not creating the double output.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.