Reputation: 9680
The project is multiple modules, each of them is deployed to a separate webserver. All of them on the same mainframe. (same IP address)
I have a main menu where I login and then list all the available modules on all servers. From here I can click and go to any of them modules.
I send cookies in the response (when logging in, say Server A), then on Server B (one of the modules) when I want to go back to the main menu, I check the cookies to see if the user is logged in.
The problem is, Server B isn't seeing cookies generated by Server A. So each time I return to main menu, the user will be logged out.
Is there anyway to store cookies to be used by multiple virtual webservers (on same IP) or any other idea?
Upvotes: 1
Views: 193
Reputation: 1063
If you set the domain-name in the cookie with the correct value, it should work:
i.E. Domainname in cookie: ".host.com"
The cookie will be sent to following hosts: "server1.host.com", "server2.host.com" ....
Upvotes: 2