【发布时间】:2021-06-14 23:31:37
【问题描述】:
我在顶级站点上有一些身份验证 cookie。
在其中呈现一个外部域 iframe。在 iframe 中,我们从顶级域添加另一个 iframe。
在我们的 iframe 中,我们需要访问 cookie,但我们得到的只是空值。
cookie 是 SameSite: Lax, Secure: none, HttpOnly: false
我在 fetch 请求上使用 set credentials: 'include' 进行了测试 - 不起作用
在底部 iframe 上带有 sandbox='allow-same-origin allow-scripts allow-forms' - 仍然没有。
有没有办法让 iframe 访问 cookie?
【问题讨论】:
标签: cookies iframe cross-domain fetch-api