Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi
I have a working site which breaks varnish as soon as I enable EU Cookie Compliance module.
Is it possible to serve cached pages from varnish and then after pop the question afterwards? I am really not sure how to address this.
Thanks.
Comments
Comment #1
Yorgg CreditAttribution: Yorgg commentedComment #2
tercerob CreditAttribution: tercerob commentedSame problem.
EU Cookies create a SESSxxxx cookie. Im not sure why it is necessary... This is the reason that Varnish fail.Ok, EU Cookies sets a cookie named "cookie-agreed-es"
So, you need to say to Varnish to ignore this cookie, so caching dont break.
In my case this is the line:
set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(__[a-z]+|has_js|NO_CACHE|cookie-agreed-es|Drupal.toolbar.collapsed|Drupal.tableDrag.showWeight)=[^;]*", "");
Its not a module problem. Its necesary to configure Varnish correctly.
Comment #3
svenryen CreditAttribution: svenryen commentedClosing this one, since it can be fixed/solved in Varnish configuration.