I have an HAProxy configuration with a frontend, and several backends which are selected according to the "host" header.
One of my backends is a Glassfish J2EE XML-RPC server, with an application whose root context is "/app-service":
Client => POST /xmlrpc => HAProxy rewrite to /app-service/xmlrpc
So I added this kind of "rewrite rule" to my backend configuration:
acl has_root_path path_beg /app-service/ http-request set-path /app-service%[path] if !has_root_path
Everything is OK for the rewrite.
But the server is generating JSESSIONID cookies whose path is also set to "/app-service", and those cookies are refused when sent by the client because the URL they use is "/xmlrpc"...
A "simple" redirect to "/app-service/xmlrpc" is not possible for the kind of clients I have, so is there any way to change JSESSIONID cookie path using HAProxy?