ACLs (or ACL-like behaviour) for req.url regex expressions
Matt Hanley
matt.hanley at eloquent-technologies.com
Thu Mar 3 18:25:43 CET 2016
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20160303/d7cbc370/attachment.html>
More information about the varnish-misc
mailing list