Try something like:
sub vcl_deliver {
if (obj.hits > 0) {
set resp.http.X-MH-Cache = "HIT " obj.hits " "* server.hostname* " " resp.http.Age;
        } else {
set resp.http.X-MH-Cache = "MISS " *server.hostname* " " resp.http.Age;
        }
}

Richard

On 12/04/2010 17:47, Angelo Höngens wrote:
Hey,

Is there a way to use fields in the VCL like the current server's name? I'd 
like to output some extra header in the response like 'X-Varnish-host: 
balancer1.domain.local' or something like that, and use the balancer hostname 
in the custom error message I've created.

(I could of course change the config for each balancers, but I'd like to keep 
one single config for all balancer nodes, easier to copy around and such.)

If this is not possible, please consider it a feature request ;) Thanks in 
advance.


_______________________________________________
varnish-misc mailing list
[email protected]
http://lists.varnish-cache.org/mailman/listinfo/varnish-misc

Reply via email to