I see something cryptic with setting SESSION_COOKIE_DOMAIN in django.
Usually, when I set this parameter to ".mydomain.net", it works fine. But sometimes cookies do not seem to be set, because when I log in, I don’t remember the session, and I become AnonymousUser when I go to the next page.
In these circumstances, if, I change my settings file so that SESSION_COOKIE_DOMAIN is now None or "", then the behavior of the site returns to normal. If I change SESSION_COOKIE_DOMAIN to mydomain, the problem will return.
Any ideas? Perhaps this will be a quiet failure in the settings? Or could this be due to my server configuration? Or the car that I am accessing the site?
source
share