• Resolved gatta2

    (@gatta2)


    We are using nginx as reverse proxy. Under the general option of GeoIP Detection, it shows (With Proxy: [My Real IP], 127.0.0.1 – Without Proxy: 127.0.0.1 – Client IP with current configuration: 127.0.0.1). It has detected the IP as 127.0.0.1 no matter what. I’ve checked phpinfo and X-Forwarded-For has two value in the form of REAL IP, 127.0.0.1

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter gatta2

    (@gatta2)

    I want to use geoip_detect2_get_info_from_current_ip(); to find out user’s country but it’s not working on our site.

    Thread Starter gatta2

    (@gatta2)

    FYI our problem is fixed after changing to the following

    // Each Proxy server append their information at the end, so the last IP is most trustworthy.
    $ip = reset($ip_list);

    The problem is that I don’t have an UI element for the option “geoip-detect-trusted_proxy_ips” yet. But this made me also realize that $trusted_proxies should always include localhost. So this will be fixed with the next release.

    You can try out the beta version if you like:
    https://github.com/yellowtree/wp-geoip-detect/archive/master.zip

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘cannot get real ip behind reverse proxy’ is closed to new replies.