Hello

On 3/3/2016 1:40 PM, Neil - HAProxy List wrote:
> Hello
> This works but is yuck (I'd have to automate generating the acl file
> from the map - not hard but not clean). Ideally I'd like a way to only
> redirect when a value is in the map what would be fine is if there were
> a contained_in_map function that I could use something like
> 
>   http-request redirect location
> %[hdr(host),map(/etc/haproxy/redirect_host.map)] code 301 if
> %[hdr(host),contained_in_map(/etc/haproxy/redirect_host.map)]
> 

Try something like:
http-request redirect location
%[hdr(host),map(/etc/haproxy/redirect_host.map)] code 301 if {
hdr(host),map(/etc/haproxy/redirect_host.map) -m found }

Regards,
Nenad

Reply via email to