Sharing django sessions on specific subdomains

后端 未结 6 1094
深忆病人
深忆病人 2020-12-05 00:29

I have example.com and support.example.com . If a user is logged in on the main site, I\'d like to have the session be accessible from the support site.

Setting the

6条回答
  •  感动是毒
    2020-12-05 01:05

    Following value should be same in all your django applications

    SESSION_COOKIE_DOMAIN = ".example.com"
    
    SESSION_COOKIE_NAME = "anycookiename"
    
    SECRET_KEY="anykey" 
    

    If you are using memcached, set same memcached location in all your django applications.

提交回复
热议问题