【发布时间】:2021-01-01 23:47:25
【问题描述】:
我有两个网站:
-
https://exampleiframe.com(第三方网站), -
https://example.com(我的网站)
我想限制 https://example.com 仅在 https://exampleiframe.com 的 iframe 内加载
我在 https://example.com 的响应标头中的 CSP 下面添加了فاث。
"Content-Security-Policy": "frame-ancestors 'self' https://exampleiframe.com"
此政策仅限制来自 iframe 的请求。但我不想在这个 iframe 之外的任何地方加载这个 url (https://example.com)。
【问题讨论】:
标签: javascript html iframe content-security-policy playframework-2.5