Using haproxy-1.5, I have the following partial config:
acl is_api hdr(host) -i api.example.com
acl is_app hdr(host) -i app.example.com
Unfortunately, the above doesn't match a request that looks like:
GET / HTTP/1.1
Host: api.example.com:80
Far as I can tell, I need to do:
acl is_api hdr(host) -i api.example.com
acl is_api hdr(host) -i api.example.com:80
acl is_app hdr(host) -i app.example.com
acl is_app hdr(host) -i app.example.com:80
UGH. NO! HATE!
Is there a nicer way of doing this? Can I just tell haproxy to ignore the port in the host header?