Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion resources/config/varnish-3/fos_debug.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

sub fos_debug_deliver {
# Add extra headers if debugging is enabled
# Add X-Cache header if debugging is enabled
if (resp.http.X-Cache-Debug) {
if (obj.hits > 0) {
set resp.http.X-Cache = "HIT";
Expand Down
7 changes: 2 additions & 5 deletions resources/config/varnish/fos_debug.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@
*/

sub fos_debug_deliver {
# Add extra headers if debugging is enabled
# In Varnish 4 the obj.hits counter behaviour has changed, so we use a
# different method: if X-Varnish contains only 1 id, we have a miss, if it
# contains more (and therefore a space), we have a hit.
# Add X-Cache header if debugging is enabled
if (resp.http.X-Cache-Debug) {
if (resp.http.X-Varnish ~ " ") {
if (obj.hits > 0) {
set resp.http.X-Cache = "HIT";
} else {
set resp.http.X-Cache = "MISS";
Expand Down