@stucky101 wrote:
Ladies and Gents
I’m trying to use a map file to make dynamic backend decisions based on user agent strings.
Problem is my user agent has spaces in it.
The mapfile works without spaces:teststring dest_pool
and in the cfg:
acl has_http_useragent hdr(user-agent),map_str(/usr/local/haproxy/maps/webcenter_useragents.cfg) -m found
use_backend %[req.hdr(user-agent),map_str(/usr/local/haproxy/maps/webcenter_useragents.cfg)] if has_http_useragentIf I add and escape a space it doesn’t match anymore:
test\ string dest_pool
I get a NOSRV
Q1. Can I change the default delimiter for the k/v’s in a map ? I have not found a reference to that.
Q2. Is there any other way to deal with the spaces ?Unfortunately, my user agent is “Studio Site Designer”
Thx for a great product
Posts: 1
Participants: 1