you should be able to add a req.http.header in your vcl_fetch.  I dont believe vcl_fetch gets called unless you are in a cache_miss and you need to contact the backend.<div><br></div><div>sub vcl_fetch { </div><div><br></div>
<div> req.http.X-Custom-Header = "test"; </div><div>}</div><div><br></div><div>Not sure varnish exposes the miss "reason" though, aside from the fact that it is either not cacheable or it is and just isn't in the cache.</div>
<div><br></div><div><br><br><div class="gmail_quote">On Sun, Dec 11, 2011 at 1:59 PM, Arjen Schat <span dir="ltr"><<a href="mailto:arjen@thenextweb.com">arjen@thenextweb.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
HI All,<br>
<br>
Is there a way to send an extra header to the backend request if a miss occurs?<br>
There are 4 scenario's I can think off: purged, old, not set and lru. This would make debugging and stats a lot easier.<br>
<br>
<br>
Thanks,<br>
Arjen<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</blockquote></div><br></div>