On Sat, Dec 12, 2015 at 9:59 PM, Michael Ezzell <[email protected]> wrote:
> > On Dec 12, 2015 8:39 PM, "David Birdsong" <[email protected]> > wrote: > > > >> You can try something like : > >> acl API_HOST hdr_dom(host) -i api.company.com > >> acl API_V3 path_beg -i /v3 > >> > >> use_backend new_backend if API_HOST API_V3 > > > > > > this might be where i picked up the presence of an implicit AND. > > > > so acl's are implicit OR > > use_backend is implicit AND > > ? > > > > ACLs are lists of tests. The list, when tested in a condition, is true > when any rule matches, so... you could call that implicit OR. > > Conditions, which usually follow the keyword "if" or "unless," are > implicit AND. > > ACL can also be anonymous (unnamed), so the following would also be > equivalent. To me, this form is often more intuitive, but can lead to > configuration inconsistencies unless the ACLs in question are only used in > one condition (otherwise, you run the risk of changing it in one place, not > another). > > use_backend new_backend if { hdr_dom(host) -i api.company.com } > { path_beg -i /v3 } > > This is a condition with two anonymous ACLs, implicitly ANDed. Note that > at least one space around the braces is mandatory for the parser to > recognize them correctly. > Thanks for this explanation Michael. I like the explicit syntax of the anonymous ACL's in the condition. I think I'll switch to these given my ACL + conditions are often pretty simple and easy to keep up-to-date.

