Skip to content

Commit

Permalink
Add cache hit info to headers
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdijk committed Oct 24, 2024
1 parent 9eb344c commit 37f681a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/varnish-proxy/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@ data:
set resp.http.X-Cacheable = "YES";
}
if (obj.hits > 0) {
set resp.http.X-Cache = "HIT";
} else {
set resp.http.X-Cache = "MISS";
}
# Cleanup of headers
unset resp.http.x-url;
unset resp.http.x-host;
Expand Down

0 comments on commit 37f681a

Please sign in to comment.