Using results match in a rule

T. Pascal t_pascal at zennet.com
Wed Nov 3 07:36:04 CET 2010


Hello, we are attempting to block some useragents in Varnish and it
works quite well, except we'd like to get some logging around that;
the idea being:

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?

-T.




More information about the varnish-dev mailing list