Advertising sustains the DA. Ads are hidden for members. Join today

On this page

Configuring Varnish and other reverse proxies

Last updated on
23 June 2022

This documentation needs work. See "Help improve this page" in the sidebar.

If Varnish does not pass requests that send a persistent login cookie through to Drupal, Persistent Login is unable to re-authenticate the user until they visit an uncached page.

To fix this, update your VCL to not serve requests that send a persistent login cookie from its cache.

Pantheon

In order to bypass Varnish on Pantheon, the Persistent Login cookie prefix needs to be configured to match the "Cache-Busting Cookie Pattern" S+ESS[a-z0-9]+ - for example SESSpl.

Platform.sh

Edit your .platform/routes.yaml file. Note the /^S?PL/ expression:

"https://{all}/":
  type: upstream
  upstream: "app:http"
  cache:
    enabled: true
    # Base the cache on the session cookie and persistent login cookie.
    # Ignore all other cookies.
    cookies: ['/^SS?ESS/', '/^S?PL/', '/^Drupal.visitor/']

Help improve this page

Page status: Needs work

You can: