Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在域名 A 中设置域名 B 的 cookie #96

Closed
Dream4ever opened this issue Sep 25, 2020 · 0 comments
Closed

在域名 A 中设置域名 B 的 cookie #96

Dream4ever opened this issue Sep 25, 2020 · 0 comments
Labels
Back-end Where data really come and go Front-end Everything you see and experience

Comments

@Dream4ever
Copy link
Owner

具体内容

先说结论:不可能。

这个和跨域没有关系,这只是 cookie 本身的限制。域名 A 的代码只能设置 A 的 cookie,不能设置域名 B 的 cookie,B 也没法设置 A 的 cookie,不然就出大事了,伪造其它域名的 cookie 就太容易了。

参考资料

@Dream4ever Dream4ever added Front-end Everything you see and experience Back-end Where data really come and go labels Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Back-end Where data really come and go Front-end Everything you see and experience
Projects
None yet
Development

No branches or pull requests

1 participant