Hi all,

Hopefully a quick question from a new Varnish user – I haven’t been able to 
find anything in the docs for this.

I’m separating static content and application servers and would like to do this 
based on several regex expressions on req.url in vcl_recv.

Is it possible to use an ACL for this?

acl static_assets {
  …
}

if (req.url ~ static_assets) {
  set req.backend_hint = static;
  return(lookup);
}
set req.backend_hint = default;
return(pass);

If this isn’t possible, is there an alternative that’s more elegant than lots 
of `if` statements?

Many thanks in advance
Matt Hanley
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to