Skip to content

Commit

Permalink
Field values are case insensitive
Browse files Browse the repository at this point in the history
Should address "HTTP cache must not use a cached response with
Cache-Control: No-CaChE, even with max-age and Expires" from
https://cache-tests.fyi.
  • Loading branch information
fgsch committed Jan 3, 2019
1 parent c143dbe commit 42f3ee8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/varnishd/builtin.vcl
Expand Up @@ -156,9 +156,9 @@ sub vcl_backend_response {
return (deliver);
} else if (beresp.ttl <= 0s ||
beresp.http.Set-Cookie ||
beresp.http.Surrogate-control ~ "no-store" ||
beresp.http.Surrogate-control ~ "(?i)no-store" ||
(!beresp.http.Surrogate-Control &&
beresp.http.Cache-Control ~ "no-cache|no-store|private") ||
beresp.http.Cache-Control ~ "(?i:no-cache|no-store|private)") ||
beresp.http.Vary == "*") {
# Mark as "Hit-For-Miss" for the next 2 minutes
set beresp.ttl = 120s;
Expand Down

0 comments on commit 42f3ee8

Please sign in to comment.