0

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?

Best regards,

Thierry

  • The application or Glassfish itself, should be made aware of which cookie-path it should use. The same thing goes for the URL it needs to use. Better if you don't need to rewrite. – Gerard H. Pille May 12 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.