sub vcl_recv {
set req.http.Surrogate-Capability = "abc=ESI/1.0";
if (req.http.Cookie) {
set req.http.Cookie = ";" + req.http.Cookie;
set req.http.Cookie = regsuball(req.http.Cookie, "; +", ";");
set req.http.Cookie = regsuball(req.http.Cookie, ";(PHPSESSID)=", "; \1=");
set req.http.Cookie = regsuball(req.http.Cookie, ";[^ ][^;]*", "");
set req.http.Cookie = regsuball(req.http.Cookie, "^[; ]+|[; ]+$", "");
if (req.http.Cookie == "") {
# If there are no more cookies, remove the header to get page cached.
unset req.http.Cookie;
}
}
Hi,
When using Cookie Consent Bundle with Varnish, the cookie consent is displayed incorrectly.
We experience two issues:
Using like:
In Varnish we strip the cookies correctly: