How to remove Main Domain cookie from Sub Domain

二次信任 提交于 2019-12-10 04:33:55

问题


is it possible to remove Main Domain cookie from Sub Domain ?I am using single sign on .On logout i want to remove the maindomain cookie


回答1:


As far as I know, you can't do that.

But couldn't you just point the logout call at the main domain? (presumably you're already doing this for the login call, in order to get the main domain cookie in the first place)




回答2:


I suspect you would have to navigate to the parent domain, have it remove the cookie, and then maybe redirect back to the child site (perhaps passing the return url encoded on the query-string).




回答3:


not ideal and not tested / validated, but you might be able to unset the cookie on the client (e.g. using javascript). Not the most elegant solution, but could potentially work.



来源:https://stackoverflow.com/questions/3923285/how-to-remove-main-domain-cookie-from-sub-domain

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!