<div dir="ltr">Hi All,<div><br></div><div><br></div><div>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 </div><div><br></div><div>==========================================</div><div><pre class="gmail-c">sub vcl_deliver <span style="color:rgb(0,153,0)">{</span>
<span style="color:rgb(51,153,51)"># Sometimes it's nice to see when content has been served from the cache. </span>
<span style="color:rgb(177,177,0)">if</span> <span style="color:rgb(0,153,0)">(</span>obj.<span style="color:rgb(32,32,32)">hits</span> <span style="color:rgb(51,153,51)">></span> <span style="color:rgb(0,0,221)">0</span><span style="color:rgb(0,153,0)">)</span> <span style="color:rgb(0,153,0)">{</span>
<span style="color:rgb(51,153,51)"># If the object came from the cache, set an HTTP header to say so</span>
set resp.<span style="color:rgb(32,32,32)">http</span>.<span style="color:rgb(32,32,32)">X</span><span style="color:rgb(51,153,51)">-</span>Cache <span style="color:rgb(51,153,51)">=</span> <span style="color:rgb(255,0,0)">"HIT"</span><span style="color:rgb(51,153,51)">;</span>
<span style="color:rgb(0,153,0)">}</span> <span style="color:rgb(177,177,0)">else</span> <span style="color:rgb(0,153,0)">{</span>
set resp.<span style="color:rgb(32,32,32)">http</span>.<span style="color:rgb(32,32,32)">X</span><span style="color:rgb(51,153,51)">-</span>Cache <span style="color:rgb(51,153,51)">=</span> <span style="color:rgb(255,0,0)">"MISS"</span><span style="color:rgb(51,153,51)">;</span>
<span style="color:rgb(0,153,0)">}</span>
<span style="color:rgb(51,153,51)"># For security and asthetic reasons, remove some HTTP headers before final delivery...</span>
<span style="color:rgb(0,0,102)">remove</span> resp.<span style="color:rgb(32,32,32)">http</span>.<span style="color:rgb(32,32,32)">Server</span><span style="color:rgb(51,153,51)">;</span>
<span style="color:rgb(0,0,102)">remove</span> resp.<span style="color:rgb(32,32,32)">http</span>.<span style="color:rgb(32,32,32)">X</span><span style="color:rgb(51,153,51)">-</span>Powered<span style="color:rgb(51,153,51)">-</span>By<span style="color:rgb(51,153,51)">;</span>
<span style="color:rgb(0,0,102)">remove</span> resp.<span style="color:rgb(32,32,32)">http</span>.<span style="color:rgb(32,32,32)">Via</span><span style="color:rgb(51,153,51)">;</span>
<span style="color:rgb(0,0,102)">remove</span> resp.<span style="color:rgb(32,32,32)">http</span>.<span style="color:rgb(32,32,32)">X</span><span style="color:rgb(51,153,51)">-</span>Varnish<span style="color:rgb(51,153,51)">;</span>
<span style="color:rgb(0,153,0)">}</span></pre><div><br></div><div><br class="gmail-Apple-interchange-newline">==========================================<br></div></div></div>