• Resolved samsteve169

    (@samsteve169)


    Hello,

    I’m the CTO of a big italian web hosting company and I’m writing about an issue that impact a lot of our customer (over 10000 sites).

    The issue consist in the error “Unable to load cookie scanner. Scanning will not work on local server.”.

    Your plugin check if the header “x-forwarded-for” is set. If “yes” the plugin totally ignore the value of other variables, for example “REMOTE_ADDR”.

    In our scenario, the HTTP_X_FORWARDED_FOR variable is set with value 127.0.0.1 (for an internal reverse proxy done with varnish) and REMOTE_ADDR is correctly fitted with the user IP.

    You need to check the content of ALL variables and if ALL variables contain “127.0.0.1”, show the error message “Unable to load cookie scanner. Scanning will not work on local server.”.

    If you need more details, just text me!

Viewing 1 replies (of 1 total)
  • Plugin Author WebToffee

    (@webtoffee)

    Hi @samsteve169,

    Greetings from Webtoffee!

    Sorry for the inconvenience caused to you. This issue happens because the scanner checks whether the site is hosted from a local server using the key in “HTTP_X_FORWARDED_FOR”. If the IP is returned as “127.0.0.1” the plugin will show the message “Unable to load cookie scanner. Scanning will not work on local server.”.

    To avoid this from happening you can copy the code from here to your sites child themes functions.php and modify the ‘key’ value of the variable $_SERVER from the return line of the function as “REMOTE_ADDR”.

Viewing 1 replies (of 1 total)
  • The topic ‘Fix HTTP_X_FORWARDED_FOR issue’ is closed to new replies.