File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change 8
8
*/
9
9
10
10
sub fos_debug_deliver {
11
- # Add extra headers if debugging is enabled
11
+ # Add X-Cache header if debugging is enabled
12
12
if (resp.http.X-Cache-Debug ) {
13
13
if (obj.hits > 0 ) {
14
14
set resp.http.X-Cache = " HIT" ;
Original file line number Diff line number Diff line change 8
8
*/
9
9
10
10
sub fos_debug_deliver {
11
- # Add extra headers if debugging is enabled
12
- # In Varnish 4 the obj.hits counter behaviour has changed, so we use a
13
- # different method: if X-Varnish contains only 1 id, we have a miss, if it
14
- # contains more (and therefore a space), we have a hit.
11
+ # Add X-Cache header if debugging is enabled
15
12
if (resp.http.X-Cache-Debug ) {
16
- if (resp.http.X-Varnish ~ " " ) {
13
+ if (obj.hits > 0 ) {
17
14
set resp.http.X-Cache = " HIT" ;
18
15
} else {
19
16
set resp.http.X-Cache = " MISS" ;
You can’t perform that action at this time.
0 commit comments