Files
RustProxy/examples/vcl/advanced-set-cookie-removal.vcl
T
2026-11-20 17:18:02 +01:00

10 lines
464 B
Plaintext

// ADVANCED / HIGH RISK. Only for a verified identical public representation.
// Removes Set-Cookie before storage and before forwarding the origin response.
// NEVER apply to login, accounts, cart, personalized JSON or CSRF flows.
sub vcl_backend_response {
if (bereq.url ~ "^/public/banner[.]svg([?]|$)" && beresp.status == 200 && beresp.http.Cache-Control ~ "(^|,) *public(,|$)") {
unset beresp.http.Set-Cookie;
set beresp.ttl = 1h;
}
}