Commit 81006eaf authored by Tollef Fog Heen's avatar Tollef Fog Heen

Handle Cache-control: (private|no-cache|no-store) by default

As per discussion at the Varnish dev meeting, seeing Cache-control:
no-cache (and friends) now disable caching by default.  As a twist, we
respect Surrogate-control if that is present, in the default VCL.

Fixes: 1124
References: 477
parent 78936f64
......@@ -104,6 +104,9 @@ sub vcl_miss {
sub vcl_fetch {
if (beresp.ttl <= 0s ||
beresp.http.Set-Cookie ||
beresp.http.Surrogate-control ~ "no-store" ||
(!beresp.http.Surrogate-Control &&
beresp.http.Cache-Control ~ "no-cache|no-store|private") ||
beresp.http.Vary == "*") {
/*
* Mark as "Hit-For-Pass" for the next 2 minutes
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment