Changing session cookie domain

Enirh6 years ago

Hi,

Is it possible to change the domain of the session cookie JSESSIONID? The cookie gets set at the /api paths, but I need it across all subdomains.

Anton Tananaev6 years ago

You would need to change Java code.

Enirh6 years ago

That's fine. I'll do the changes. I am not much familiar with jetty. Can you tell where to make the changes? I saw the cookie getting created on line 105 of SessionResource.java. I don't know though how to change the cookie domain. I want to change it from, let's say, api.domain.com to .domain.com, I need to access the session cookie from subdomain as well.

Anton Tananaev6 years ago

Most likely the change should be in the WebServer class.