In message <[email protected]>, Chris Hecker writes: >Can I use server.ip in vcl_recv to force the host to the right site if >there's no host record? What would the code look like to do this? >Something like: > >if(!req.http.host) { > if(server.ip == "a.b.c.d") { > set req.http.host = "a.com"; > } elsif(server.ip == "a.b.c.e") { >...etc
Yes, that is server.ip was intended to be used. If that does not work, it is a bug. -- 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] http://lists.varnish-cache.org/mailman/listinfo/varnish-misc
