phk at phk.freebsd.dk
Tue Apr 8 16:29:59 CEST 2008
In message <0xj0i7k8gg801e8.080420081615 at torlen.net>, duja at torlen.net writes:
>Im trying to figure out some ways to extend the response headers
>with some info of the request. What I want for now is if it was a
>hit or miss and which backend it used.
Hit/Miss status is already in the X-Varnish header, if it has two
numbers it is a hit.
>I cant figure out how to know which backend it used. The only way
>i know of is if the backend would deliver a header with host name
>or something similar. Is there any way to do this in VCL?
You can set your own header in vcl_recv along with the backend.
Then in vcl_fetch, copy that header from req.foobar to obj.foobar
and you should be all set.
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the varnish-misc