server.ip for "undoing" namevirtualhosts issues

Poul-Henning Kamp phk at phk.freebsd.dk
Mon Jul 12 10:55:22 CEST 2010


In message <4C3AD647.3070409 at d6.com>, Chris Hecker writes:

>if(!req.http.host ||
>    (req.http.host ~ "^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$"))
>{
>	blah;
>}
>
>but I haven't tried that yet, since I realized I don't need it yet. 
>Does that look right?

yeah, looks pretty good to me.  Not sure if you risk seeing a port
number in the Host: header also ?

Remeber that you can always start a varnish on a different port number
to experiement with.

-- 
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 mailing list