• Resolved mnenoff

    (@mnenoff)


    My site runs in a docker container (behind proxy) and Slimstat shows always the local ip like this: 172.17.0.8 ( Originating IP: 74.80.208.67)

    Then all analytics say that there is only one visitor (the local ip).

    How Can I make Slimstat use the Originating IP intead?

    I didn’t find such an option and also didn’t find anything about this in interned or in the forum.

    • This topic was modified 1 year, 10 months ago by mnenoff.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mostafa Soufi

    (@mostafas1990)

    Based on what I see here and here, it appears that some configuration might be required on the Nginx side.

    Regarding the filter that retrieves the IP address in SlimStat and modifies the return value, one potential solution in this scenario could be to switch to using HTTP_X_FORWARDED_FOR

    add_filter('slimstat_filter_ip_address', function () {
        return sanitize_text_field(wp_unslash($_SERVER['HTTP_X_FORWARDED_FOR']));
    });

    Hope would be useful!

    Thread Starter mnenoff

    (@mnenoff)

    Thank You for the fast response! I’ll try it right away.

    Plugin Author Mostafa Soufi

    (@mostafas1990)

    Your welcome ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Use the Originating IP instead’ is closed to new replies.