diff --git a/doc/docker/selenium.yml b/doc/docker/selenium.yml index d8ed0dc6a8..b02166217d 100644 --- a/doc/docker/selenium.yml +++ b/doc/docker/selenium.yml @@ -14,7 +14,7 @@ services: networks: - backend # Because of: https://github.com/elgalu/docker-selenium/issues/20 - shm_size: 256m + shm_size: 512m app: depends_on: diff --git a/doc/varnish/vcl/varnish4_xkey.vcl b/doc/varnish/vcl/varnish4_xkey.vcl index ff19f6936a..d73175f0ca 100644 --- a/doc/varnish/vcl/varnish4_xkey.vcl +++ b/doc/varnish/vcl/varnish4_xkey.vcl @@ -248,15 +248,15 @@ sub vcl_deliver { } } - if (client.ip ~ debuggers) { - # 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. - if (resp.http.x-varnish ~ " ") { + // Add X-Cache header if debugging is enabled + if (obj.hits > 0) { set resp.http.X-Cache = "HIT"; set resp.http.X-Cache-Hits = obj.hits; - set resp.http.X-Cache-TTL = obj.ttl; + // Not readable on Varnish 4.1LTS, so check for existence until we drop support for it in future versions + if (obj.ttl) { + set resp.http.X-Cache-TTL = obj.ttl; + } } else { set resp.http.X-Cache = "MISS"; }