Ban URL - req.backend unsupported?
Cedric Jeanneret
varnish at tengu.ch
Mon Jun 24 13:53:44 CEST 2013
On Mon, 24 Jun 2013 13:16:43 +0200
Dag Haavi Finstad <daghf at varnish-software.com> wrote:
> On Mon, Jun 24, 2013 at 7:30 AM, Cedric Jeanneret <varnish at tengu.ch> wrote:
> >
> >
> > I'm trying to ban some content matching the configured req.backend, but it seems it's not working as expected:
> >
> > varnish> ban req.backend == "foo_bar" && req.url ~ "^/baz/foo"
> > 106
> > unknown or unsupported field "req.backend"
> >
> > I thought the ban syntax would take any of VCL variable (req.url, obj.set-cookie, req.http.host… and so on)… ?
>
>
> Currently, ban expressions are restricted to the following variables:
> req.url
> req.http.*
> obj.http.*
> obj.status
>
>
> So yes, you won't be able to use req.backend in a ban expression. I'm
> not sure if there are any plans to expand on this.
>
> --
> Dag Haavi Finstad
> Software Developer | Varnish Software AS
> Mobile: +47 476 64 134 | Office: +47 21 98 92 60
> We Make Websites Fly!
Hello Dag,
Thank you for your fast answer. It would be really great to add some new expression, as it may help people to flush/ban content in a more convenient way. For example, having many hosts aliases hitting the same backend would make use of the req.backend filter…
Anyway, this kind of solve my problem - in the current application it doesn't matter whether we can or not use the req.backend.
Cheers,
C.
More information about the varnish-misc
mailing list