'ha-proxy using a query parameter as a heather
I need to read one parameter from the query string and use is a heather. i tried a few option but none seems to work. Here is my example
--- sample query ---
https://www.testdomain.com/something?param1=foo¶m2=bar
--ha-proxy frontend --
frontend lb_test
bind :443 ssl crt /etc/ssl/certs/mycert.pem
mode http
acl the_param2 { query -m sub -i param2= }
http-request add-header X-VALUE the_param2
use_backend lb_test if the_param2
--- ha-proxy backend ---
backend lb_test
balance roundrobin
server srv1 x.x.x.x:<port_number> check
Thanks in advance!
regards
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
