<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Try something like:<br>
sub vcl_deliver {<br>
if (obj.hits > 0) {<br>
set resp.http.X-MH-Cache = "HIT " obj.hits " "<b>
server.hostname</b> " " resp.http.Age;<br>
} else {<br>
set resp.http.X-MH-Cache = "MISS " <b>server.hostname</b>
" " resp.http.Age;<br>
}<br>
}<br>
<br>
Richard<br>
<br>
On 12/04/2010 17:47, Angelo Höngens wrote:
<blockquote
cite="mid:2903443B3710364B814B820238DDEF2CA761B62C@TIL-EXCH-01.netmatch.local"
type="cite">
<pre wrap="">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.
</pre>
</blockquote>
<br>
</body>
</html>