Support » Plugin: Site Reviews » The IP address appears as 127.0.0.1 when using Cloudflare

  • Resolved pikamander2

    (@pikamander2)


    Using Cloudflare causes the review authors’ IP addresses to be recorded as 127.0.0.1 (localhost) instead of their actual IP address.

    https://i.imgur.com/1j9xwQ4.png

    This is a common issue that pops up when Cloudflare is being used. One solution that I’ve seen is to check the value of $_SERVER[‘HTTP_CF_CONNECTING_IP’] and use it if it’s populated. If it’s not populated, the code can default back to its current method of getting the IP address.

    Would it be possible to add support for that to the plugin?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.