Using results match in a rule

Nils Goroll slink at schokola.de
Wed Nov 3 10:25:25 CET 2010


> if (req.http.User-Agent ~ "(ua1|ua2|ua3") {
>         error 403 "Forbidden UA $1";
> }
> 
> ...where $1 is the match part.  This should be easy I would have thought?

I have written code to do this, but it has not (yet) made it into Varnish, see:
http://www.varnish-cache.org/trac/ticket/666 (call 666 for matchorchist)

Nils




More information about the varnish-dev mailing list