Trying to match the following in haproxy:
acl instagiveweb hdr_beg(host) -i foo*.something.com
where url can be foo-staging.something.comorfoo.something.com
foo-staging.something.com
foo.something.com
I looked through the docs at https://www.haproxy.com/doc/aloha/7.0/haproxy/acls.html#data-types-and-matching-between-samples-and-patterns , but it's hard for me to find a suitable template.
Any help appreciated!
You want hdr_reg()("reg" ex), not hdr_beg()(literal string prefix / "beg").
hdr_reg()
hdr_beg()
acl instagiveweb hdr_reg(host) -i ^foo[^\.]*\.example\.com$
, foo, 0 , ., .example.com .
foo
.
.example.com