Home Forums WTI Like Post PRO HTTP_X_FORWARDED_FOR with multiple IPs

This topic contains 0 replies, has 1 voice, and was last updated by  exiledmessenger 1 year ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #439

    exiledmessenger
    Participant

    On our server, WTI is getting the user’s IP address from HTTP_X_FORWARDED_FOR (HTTP_CLIENT_IP is empty). But this variable is coming with multiple IP addresses (IP + proxy IPs), and because of that, voting only once based on IP isn’t working. I temporarily fixed with adding the code below to wp-content/plugins/wti-like-post/wti-like-post-pro.php WtiGetRealIpAddress function, but that’s something that will be overwritten in the next update if not fixed by you guys. Thank you.

    $wti_ip_address = explode(‘,’, $wti_ip_address);
    $wti_ip_address = trim(reset($wti_ip_address));

    return $wti_ip_address;

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.