Reputation: 5275
I am facing a problem related to Django session. I have an web application which is integrated with another web application. I want to run both application with same domain name but when I run first application and open second application from first UI, the session is getting expired of the first application.
For example the main domain is "https://test.test.com" and suppose when I open my first django project as "https://test.test.com/analysis" and go to second project from it using href "https://test.test.com/result" from interface it opens in new tab but when I try to do any operation on my first project "https://test.test.com/analysis" the session gets expired.
Upvotes: 0
Views: 177
Reputation: 55
You can use SESSION_COOKIE_PATH to some url, but session will only work for those or similar urls etc. SESSSION_COOKIE_PATH='/foo', then it will only work on '/foo/', '/foobar' etc.
Upvotes: 1
Reputation: 859
Have a look at the django docu (https://docs.djangoproject.com/en/1.5/topics/http/sessions/)
I think this is the part which you will need:
SESSION_COOKIE_PATH
Default: '/'
The path set on the session cookie. This should either match the URL path of your Django installation or be parent of that path.
This is useful if you have multiple Django instances running under the same hostname. They can use different cookie paths, and each instance will only see its own session cookie.
Upvotes: 2