This commit is contained in:
Mateusz Gruszczyński committed 2026-11-20 23:14:19 +01:00
1 parent d455028de3
commit 5b2eaaff61
36 files changed
+2544 -102

No files matched your search

+5 -1
View File
@@ -16,8 +16,12 @@ sub vcl_recv {
if (req.http.Cookie ~ "^(?:__cf_bm|cf_clearance|_cfuvid|__cfruid|__cfseq|_abck|ak_bmsc|bm_sz|bm_sv)=[^;]*(?:;[ \t]*(?:__cf_bm|cf_clearance|_cfuvid|__cfruid|__cfseq|_abck|ak_bmsc|bm_sz|bm_sv)=[^;]*)*$") {
unset req.http.Cookie;
}
// Remaining cookies: Cookie/session guard. RustProxy extension
// return(cookie_pass) bypasses pages like return(pass) but lets public
// static assets use the cache when "Ignore request cookies for static
// files" is on. In stock Varnish use return(pass) here.
if (req.http.Cookie) {
return(pass);
return(cookie_pass);
}
return(hash);
}
@@ -1,5 +1,6 @@
// Opt-in example: this Vhost uses "session" while an unrelated Drupal 6 site
// at the parent domain sets cookies named SESS<hash> or SSESS<hash>.
// Requires RustProxy 0.39.2+ (return(cookie_pass); use return(pass) on 0.39.1).
// RustProxy 0.39.1 (with prefix selector support) only: remove_req_cookies()
// supports exact names and a single trailing '*' for case-sensitive prefixes.
// Not standard Varnish VCL. A normal 0.39.1 binary without this patch will
@@ -10,9 +11,12 @@
// Keep CDN technical-cookie rules separate and later than this rule.
// Retain "CDN: bypass remaining cookies" to protect unknown session cookies.
sub vcl_recv {
// Subdomain's OWN login cookie must always skip shared cache.
// Subdomain's OWN login cookie must always skip the shared cache for
// pages. return(cookie_pass) (RustProxy extension) still lets public
// static assets use the cache under the static cookie policy; use
// return(pass) instead if even static files must bypass for this cookie.
if (req.http.Cookie ~ "(?:^|;[ \\t]*)session=") {
return(pass);
return(cookie_pass);
}
if ((req.method == "GET" || req.method == "HEAD") &&