Combining req.url matches

Nils Goroll slink at
Mon Jan 11 10:59:20 CET 2010

Hi "Pub Crawler",

> For instance:
> if (req.url ~ "photoupload.cfm") {pass;}
> if (req.url ~ "logoupload.cfm") {pass;}
> Is there a prescribed way to combine that into one line?

Firstly, you should note that the argument to the ~ operator is a regexp, so if 
you mean a literal dot, it's \. . You can also group subexpressions like this:

if (req.url ~ "(photo|logo)upload\.cfm") {pass;}


More information about the varnish-misc mailing list