I want to create an ACL in haproxy 1.6 that allows a particular url and url parameter ONLY when they both appear at the same time. For example:
example.com/url/of/page3?foo=bar
I am doing this already in the frontend section of my haproxy config:
acl whitelist path /url/of/page1
acl whitelist path /url/of/page2
acl whitelist path_beg /url/of/page3
block unless whitelist
How do I use url_param in combination with with path in my acl?
block
directive is deprecated. Using this, gives you:It still works, but it might get removed in the future.
Regarding your question:
Just set up another ACL:
This tests the first, and only the first url param against the name
foo
and the valuebar
, and evaluates toTRUE
orFALSE
.So, after this, check for the results via: