Answer the question
In order to leave comments, you need to log in
How to return two session cookies at once in Django?
Hello everyone,
as you know, by default in Django SESSION_COOKIE_DOMAIN = "domain.com". And if we want sessions to be rummaged between subdomains, then we add a dot: SESSION_COOKIE_DOMAIN = ".domain.com"
The problem is that if the site was launched with the first option, and in the process it decided to change to the second, all users will lose their sessions.
As far as I understand, this problem can be solved by returning two session cookies at once -
Domain=.domain.com; Path=/
Domain=domain.com; Path=/
The question is, what is the best way to do this in Django?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question