【发布时间】:2020-02-19 05:57:26
【问题描述】:
<!DOCTYPE html>
<html>
<body>
<iframe src="URL">
<p>Your browser does not support iframes.</p>
</iframe>
</body>
</html>
我正在使用上面的代码在 iFrame 中加载 url,但出现以下错误: 拒绝在框架中显示“URL”,因为祖先违反了以下内容安全策略指令:“frame-ancestors https://inteliapp-stage.grymatter.com URL1 URL2 URL3 URL4 URL5 URL6 URL7 http://18.233.166.250https://18.233.166.250cdn.jsdelivr.net"。
出于安全原因,我无法提及确切的 URL。我想知道我应该在内容安全策略的元标记中添加什么来解决问题?如果我们无法解决问题,那么我们如何在 html 代码中加载 url。请帮帮我。提前致谢。
【问题讨论】:
标签: html iframe content-security-policy