Sergio Mendez
Sergio Mendez

Reputation: 1519

How to transfer session variables throught domain django?

I have an multidomain app in django.

mx.myapp.com
nz.myapp.com
hn.myapp.com

and it works well. The problem is when I login in mx.myapp.com and some link have to redirect to nz.myapp.com the session variables are not set. How do I keep logged whith my account throught the diferent domains?

I think I have to transfer de session variables to another subdomain or something like that but I don't know how to do it. Please help.

Upvotes: 1

Views: 260

Answers (1)

Abhijith Asokan
Abhijith Asokan

Reputation: 1875

You can specify this in SESSION_COOKIE_DOMAIN variable in settings.py file.

 SESSION_COOKIE_DOMAIN = '.myapp.com' #for cross domain cookies

Don't forget the leading dot.

Upvotes: 2

Related Questions