hi,
I am routing to a backend if a certain cookie exists in the request.
The following works just fine:
acl has_cookie req.cook(lacan_xyz) -m found
use_backend canary_backend if has_cookie
Ideally I would like to use a map definition to avoid having to restart haproxy if/when the cookie name or value changes (from my understanding, making changes to map files can work without a restart). For example:
use_backend %[req.cook(lacan_xyz), map(/etc/haproxy/map_file.map, default_backend)]
In map_file.map, the key would be the cookie value and the value would be the name of a backend definition.
Attempting to do this results in a warning, and my desired functionality not working.
The warning:
Starting haproxy: [WARNING] 115/173343 (16970) : parsing [/etc/haproxy/haproxy.cfg:57] : Ignoring end of truncated ‘acl’ line after ‘req.cook(lacan_xyz),’
The haproxy version being used:
HA-Proxy version 1.6.1 2015/10/20
any insight or suggestions would be most appreciated,
thank you