Hi Matt,
On Thu, Mar 3, 2016 at 6:25 PM, Matt Hanley
<[email protected]> 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
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc