From a0783531612673a53891560ff4e60b4371832e86 Mon Sep 17 00:00:00 2001 From: Dan Mooney <30629803+danmooney2@users.noreply.github.com> Date: Mon, 24 May 2021 11:48:01 -0500 Subject: [PATCH] Update default.vcl - Use Hit-For-Pass if Cache-Control response headers contain "no-cache" or "no-store" --- images/varnish/6.2/etc/default.vcl | 1 + 1 file changed, 1 insertion(+) diff --git a/images/varnish/6.2/etc/default.vcl b/images/varnish/6.2/etc/default.vcl index d9a17a55..5be21ea5 100755 --- a/images/varnish/6.2/etc/default.vcl +++ b/images/varnish/6.2/etc/default.vcl @@ -152,6 +152,7 @@ sub vcl_backend_response { # If page is not cacheable then bypass varnish for 2 minutes as Hit-For-Pass if (beresp.ttl <= 0s || beresp.http.Surrogate-control ~ "no-store" || + (!beresp.http.Surrogate-Control && beresp.http.Cache-Control ~ "no-cache|no-store") || (!beresp.http.Surrogate-Control && beresp.http.Vary == "*")) { # Mark as Hit-For-Pass for the next 2 minutes set beresp.ttl = 120s;