Viewing 3 replies - 1 through 3 (of 3 total)
  • Boris Kuzmanovic

    (@boris-kuzmanovic)

    Ran into this myself today. Here’s a fix that works.

    The default.vcl script is most likely removing cookies needed for social login to work. Skip caching of anything passed to a URL that starts with
    /wp-content/plugins/wordpress-social-login/hybridauth/?

    Here’s what I have:

    sub vcl_recv {
        # lines skipped here
    
        # Do not cache these paths
        if (req.url ~ "^/wp-cron\.php$" ||
            req.url ~ "^/xmlrpc\.php$" ||
            req.url ~ "^/wp-admin/.*$" ||
            req.url ~ "^/wp-includes/.*$" ||
            # Allow WP Social login to bypass Varnish cache
            req.url ~ "^/wp-content/plugins/wordpress-social-login/hybridauth/\?" ||
            req.url ~ "\?s=") {
                return (pass);
        }
    
        # Define the default grace period to serve cached content
        set req.grace = 6h;
    
        # By ignoring any other cookies, it is now ok to get a page
        unset req.http.Cookie;
        return (lookup);
    }

    Hope it helps.

    Thread Starter Martin

    (@rastarr)

    Thanks for the reply, Boris.
    As it turns out, I ditched Varnish and went with Nginx, memcached, php-fpm 5.5 and W3total Cache, for my situation and sites. A lot less issues and lots faster for my sites.
    Thanks again though and hope it helps someone else

    Jon Scaife

    (@jonscaife)

    My varnish config was stripping cookies so i had to make another mod in addition to this one.
    in the vcl_hash section I had to include the following
    hash_data(req.http.Cookie);

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Varnish and WSL anyone?’ is closed to new replies.