In message <[email protected]>, Scott Wilcox writes:

>1) Can listening host/port be set in the VCL?

No, but you can set it from the CLI.

>sub vcl_hit {
>       set obj.http.X-Cache-Hit = "true";
>
> [...]
>
>Message from VCC-compiler:
>'obj.http.X-Cache-Hit': cannot be set in method 'vcl_hit'.

And it's right:  You don't have an object to modify at that
point.  Set req.http.X-Cache-Hit instead and copy that to
the response in vcl_deliver{}

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[email protected]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

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

Reply via email to