[varnish] Add X-Cache headers

This commit is contained in:
Vincent Ambo 2015-11-21 21:20:12 +01:00
parent 813c273e68
commit 6138a8b0f8

View file

@ -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 {