Support » Plugin: StatComm (StatPress Community) Multisite Edition » [Plugin: StatComm (StatPress Community) Multisite Edition] Correct IP address behind reverse proxy

  • Resolved rogst

    (@rogst)



    Hi

    I have my wordpress site behind a reverse proxy, this sets REMOTE_ADDR to 127.0.0.1. To get the client IP the plugin needs to get the address from HTTP_X_FORWARDED_FOR.

    I changed line 958 in statcomm.php to:
    $ipAddress = isset($_SERVER[‘HTTP_X_FORWARDED_FOR’]) ? $_SERVER[‘HTTP_X_FORWARDED_FOR’] : $_SERVER[‘REMOTE_ADDR’];

    Thanks to an awesome plugin

    http://wordpress.org/extend/plugins/statpress-community-formerly-statcomm/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author WPReady

    (@wpready)

    Excellent tip!
    We’ll add to the next release.

    Thanks for your feedback!

    I still get the 127.0.0.1 display even with this modify. How can I fix it?

    Thanks.

    Hi Neysachen

    You need to make sure your reverse proxy is sending the http header X_FORWARDED_FOR along the request which contains the real client IP.

    Thank you for your reply, but sorry i can not understand what do you mean.

    Plugin Author WPReady

    (@wpready)

    Current version 1.7.60 adress the problem thanks rogst suggestion.
    Rogst you will be mentioned on the contributor list.
    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: StatComm (StatPress Community) Multisite Edition] Correct IP address behind reverse proxy’ is closed to new replies.