I had a similar problem and the problem was that I used the host value to store cookies with "www", that is www.mydomain.com, and I made an Ajax request without www '
The solution uses a wildcard pattern, such as a host. Like .mydomain.com , since your host stores the session cookie at the end of the browser.
Just make sure you're not a victim of this?