// 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"); } }