On Mon, 24 Jun 2013 13:16:43 +0200
Dag Haavi Finstad <[email protected]> wrote:

> On Mon, Jun 24, 2013 at 7:30 AM, Cedric Jeanneret <[email protected]> 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.

_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to