• 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 2 replies - 1 through 2 (of 2 total)
  • Thread Starter samsteve169

    (@samsteve169)

    This what is needed to edit is this:

    wpl-cookie-consent/admin/modules/cookie-scanner/class-wpl-cookie-consent-cookie-scanner.php:

                    if ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
    // EDIT THIS IF CONDITION
                            $ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
                    } else {
                            $ip_address = $_SERVER['REMOTE_ADDR'];
                    }
    Plugin Author WPeka

    (@wpeka-club)

    Hi there,

    We appreciate your kind feedback. We will definitely look into this.

    And the changes will be made in the upcoming releases.

    Regards,
    Team WPeka

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