Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4720

Haproxy set variable value from map

$
0
0

@ykiran_k wrote:

I am trying to set a variable value from map contents, base on the path.

 http-request set-var(req.prefdomain) %[path,map_beg(/etc/haproxy/haproxy_path_domain.map)]

here is my map content

 /abc/def/v1        domain1
 /ijk/lmn/v2          domain2

My use case if the path (/abc/def/v1) is configured (in map) to be served on domain1 then i want to restrict the path on domain2. i was try to get the domain1 & domain2 in a custom variable. Using that variable to check the string match & handle routing or deny. Is there a way to get domain1 to prefdomain variable? if so can you suggest the fix for the above http-request line.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4720

Trending Articles