On Fri, 2 Feb 2024 at 15:09, Tom Braarup <tom.braa...@jppol.dk> wrote: > > Hi, > > The config validator does not seems to catch this error in syntax and Haproxy > ignores the second part of the expression: > > use_backend api.example.com if { req.hdr(host) -i example.com and path_beg > /api }
This is correct syntax and matches when the host header corresponds to the 4 possible values that have been indicated: "example.com" "and" "path_beg" as well as: "/api" Just like acl url_static path_beg /static /images /img /css matches 4 different URI prefixes. Me and you understand that this is not what you wanted, but it will never be possible for the configuration parser to know that, unless it is an AI. BR, Lukas