ACLs (or ACL-like behaviour) for req.url regex expressions
Dridi Boukelmoune
dridi at varni.sh
Mon Mar 7 11:54:26 CET 2016
Hi Matt,
On Thu, Mar 3, 2016 at 6:25 PM, Matt Hanley
<matt.hanley at eloquent-technologies.com> wrote:
> Is it possible to use an ACL for this?
>
> acl static_assets {
> …
> }
Short answer, no.
> If this isn’t possible, is there an alternative that’s more elegant than
> lots of `if` statements?
There's none AFAICT but you could try to get in touch with developers
from UPLEX, they have an regex VMOD [1] that could be a nice fit for
what you are trying to do.
One could imagine something like:
new static_assets = re.multi_regex(
...
);
if (static_assets.match(req.url)) {
set req.backend_hint = static;
return(lookup);
}
Cheers,
Dridi
[1] https://code.uplex.de/uplex-varnish/libvmod-re
More information about the varnish-misc
mailing list