I would assume this could work but can seem to get it to work, any tips?
server server1 x.x.x.x:prt check
server server2 x.x.x.x:prt check
server server3 x.x.x.x:prt check
acl is_specific_server srv_id 2
http-request set-path /13f49e5dbb7af4%[path] if is_specific_server
I want it to add the path only when the backend is using server2
As stated in the documentation, srv_id
only returns the id during the response, thus it will fail if used in request oriented actions.
This is because haproxy usually needs to process request to choose the destination server (ie: depending on lb algo), thus the server is not known at this point.
To achieve this, Iām afraid you should probably use a dedicated backend for the server that requires specific handling.
1 Like