Any option to identify if a request is pass in browser headers.
sreeranj s
sreeranj4droid at gmail.com
Thu May 18 08:56:14 CEST 2017
Hi All,
Following is added in vcl-deliver section to identify if the content is
served from cache or from backend. Similarly is there an option that we can
identify if the request was a PASS
==========================================
sub vcl_deliver {
# Sometimes it's nice to see when content has been served from the cache.
if (obj.hits > 0) {
# If the object came from the cache, set an HTTP header to say so
set resp.http.X-Cache = "HIT";
} else {
set resp.http.X-Cache = "MISS";
}
# For security and asthetic reasons, remove some HTTP headers before
final delivery...
remove resp.http.Server;
remove resp.http.X-Powered-By;
remove resp.http.Via;
remove resp.http.X-Varnish;}
==========================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20170518/b3bde19a/attachment.html>
More information about the varnish-misc
mailing list