Sharing django sessions on specific subdomains

后端 未结 6 1097
深忆病人
深忆病人 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条回答
  •  猫巷女王i
    2020-12-05 00:50

    I dont know django, but is possible for you to set 2 cookies instead of 1? See, a cookie is send only if cookie domain matches url domain correct? If you want to have the same session on 2 different domains you could set 2 cookies with same value and diferent domains. In this case .example.com and support.example.com. So you will receive this cookie only when acessing one of those.

提交回复
热议问题