• Resolved franck86

    (@franck86)


    Hello,

    the procedure wp_cassify_get_current_url in wp_cassify_utils.php, took the $_SERVER[‘SERVER_NAME’] to build the service url.

    When the server is beyond a proxy this is not working, in my case i had to modified the line 69 like this :
    //$current_url .= $_SERVER[ ‘SERVER_NAME’ ];
    $current_url .= $_SERVER[ ‘HTTP_X_FORWARDED_HOST’ ];

    Thanks

    Franck

    https://www.ads-software.com/plugins/wp-cassify/

Viewing 1 replies (of 1 total)
  • Hi,

    Thanks for your reply. You are right ! I’ve made a test behind a reverse proxy. It seems that if application is hosted behind a reverse proxy, server variable $_SERVER[ ‘HTTP_X_FORWARDED_HOST’ ] is set and if application is hosted without proxy $_SERVER[ ‘HTTP_X_FORWARDED_HOST’ ] is not set.

    So I’ve made a fix in new plugin version like that :

    // If cassified application is hosted behind reverse proxy.
    if ( isset( $_SERVER[ ‘HTTP_X_FORWARDED_HOST’ ] ) ) {
    $current_url .= $_SERVER[ ‘HTTP_X_FORWARDED_HOST’ ];
    }
    else {
    $current_url .= $_SERVER[ ‘SERVER_NAME’ ];
    }

    I’ve made thanks to you on the plugin front page.

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘error beyond a reverse proxy’ is closed to new replies.