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

Get srv_name before sending to server

$
0
0

Hi, I have a setup with 2 backend servers srv1 and srv2. I need to change the Host header only if the request is going to srv2. This means srv2 receives the request with the changed Host.
Here is what I tested:

acl is_srv2 srv_name srv2
http-request set-header Host %[req.hdr(host),lower,regsub(find,replace)] if is_srv2

But the following error is shown:

acl 'is_srv2' will never match because it only involves keywords that are incompatible with 'backend http-request header rule'

I guess this is because srv_name is not available on the http-request phase. Is there a way of accomplishing this?

Thanks

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4718

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>