作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们有一个 webapp,它在 iFrame 的不同站点上嵌入了另一个 webapp。这已经存在几年了。上周我们开始收到一些用户的错误报告。经过调查,我们发现在 2020 年 8 月 10 日发布的 Chrome 84.0.4147.125 上,iFrame 中的 cookie 不会发送回服务器。此问题仅在此 chrome 版本后出现。旧版本和其他浏览器工作正常。
此版本中哪些更改可能会产生这种影响?
最佳答案
感谢@Eyal.D 指出解决方案。
如 https://stackoverflow.com/a/45095345/1401409 中所述:
Chrome now blocks cookies without
SameSite
set, so you need toexplicitly set it tosamesite=none
.
Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure;SameSite=None
我会补充,如
https://stackoverflow.com/a/57874184/1401409 中所述:
If you own the somesite.com you can opt-out of this policy by settingSameSite policy to None and deal with the risk of CSRF attacks by adoing Double Submit Cookie.
关于google-chrome - 2020 年 8 月 10 日更新后,Chrome 不会在 iframe 中发回 cookie,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63439016/
我是一名优秀的程序员,十分优秀!