Ignore port numbers in haproxy host header matches
You might be able to get this to work by checking hdr_dom (https://code.google.com/p/haproxy-docs/wiki/MatchingLayer7) instead of hdr:
acl is_api hdr_dom(host) -i api.example.com
acl is_app hdr_dom(host) -i app.example.com
Just be careful because I believe this would also match things like "otherstuff.api.example.com".