This commit is contained in:
Mateusz Gruszczyński committed 2026-11-20 20:54:40 +01:00
1 parent 53d92e0da6
commit 08d1608ef5
21 files changed
+928 -408

No files matched your search

@@ -0,0 +1,20 @@
// Opt-in Vhost-only rule, SEPARATE from the CDN technical-cookie template.
// RustProxy VCL extension: remove_req_cookies() is NOT standard Varnish VCL.
// Replace REPLACE_WITH_VERIFIED_PARENT_COOKIE_NAME with exact, verified names
// that this Vhost NEVER uses for login, user state, language, cart, etc.
// Cookie headers do NOT reveal Domain; a name may also belong to this Vhost.
// Never list a session cookie that could be valid for this Vhost.
//
// Install ABOVE "CDN: remove ONLY technical cookies" and
// "CDN: bypass remaining cookies", which must stay as separate rules.
// DO NOT use the old strip-all inherited-cookie rule in parallel.
// This rule has no return(hash): remaining cookies and sessions still pass
// through the CDN/normal cache safety checks.
sub vcl_recv {
if ((req.method == "GET" || req.method == "HEAD") &&
req.http.Cookie &&
!req.http.Authorization &&
req.url !~ "^/(admin|api|auth|login|logout|account|profile|user|settings|dashboard|cart|checkout|panel|konto|wp-admin|wp-login[.]php)(/|[?]|$)") {
remove_req_cookies("REPLACE_WITH_VERIFIED_PARENT_COOKIE_NAME");
}
}