Hello list,
I'm currently trying to migrate our stack from haproxy 1.7 to 2.0 and
hit an issue with device detection.
We are using 51-Degrees for device detection. Our haproxy-1.7 instances
are built with the 51-degrees v3.2.10 branch, the relevant config looks
like this:
global
...
51degrees-data-file /path/to/51Degrees-LiteV3.4.trie
51degrees-property-name-list IsMobile
frontend www
...
http-request set-header X-IsMobile %[51d.all(IsMobile)]
This works as expected, the header X-IsMobile is set to either 'True' or
'False', depending on the device type.
The same config with haproxy-2.0.9 built with the latest 51-Degrees
branch v3.2.20.4 does not work. The X-IsMobile header is set to '1'
unconditionally, i.e. for both mobile and desktop devices.
If I replace the 51d.all fetch method with the 51d.single converter, it
works:
frontend www
...
http-request set-header X-IsMobile
%[req.fhdr(User-Agent),51d.single(IsMobile)]
Again, the header is set to either 'True' or 'False' as expected,
depending on the UA.
Is this a problem with my config, a known issue, or am I missing
something else?
Best regards
Florian