This is a way using HAProxy rules to only allow access to a given host if the request was to a specific route while specifying multiple conditions, and they’re implicitly AND’
For instance:
# to route to the backend `the_host`, which is found at http://host.local
acl host_the_host hdr(host) -i host.local
acl host_the_host_allow_webhook path_beg,url_dec -i /webhook
use_backend host.local if host_the_host host_the_host_allow_webhook
^ this is implicitly an and between these two ACLs