about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--varnish/default.vcl6
1 files changed, 6 insertions, 0 deletions
diff --git a/varnish/default.vcl b/varnish/default.vcl
index a06bb744b725..5a15d21a9c98 100644
--- a/varnish/default.vcl
+++ b/varnish/default.vcl
@@ -41,6 +41,12 @@ sub vcl_backend_response {
 sub vcl_deliver {
         # Add an HSTS header to everything
         set resp.http.Strict-Transport-Security = "max-age=31536000;includeSubdomains;preload";
+
+        if (obj.hits > 0) {
+                set resp.http.X-Cache = "HIT";
+        } else {
+                set resp.http.X-Cache = "MISS";
+        }
 }
 
 sub vcl_synth {