由于违反 CSP,网站未显示在 iframe 中

Site not displaying in iframe due to CSP violation

我在 Chrome 中看到一个 iframe 错误: 拒绝显示“https://secure.entertimeonline.com/ta/7687.careers?careersSearch=1&HostedBy=atticangel.org&InFrameset=1' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors file: cdvfile: 'self' https://atticangel.org”。

这是 iframe 的代码:

<iframe src="https://secure.entertimeonline.com/ta/7687.careers?careersSearch=1&HostedBy=atticangel.org&InFrameset=1" width="100%" height="900" frameborder="1"> </iframe>

您可以在此处查看操作中的错误:https://www.atticangel.org/work-here/job-openings

我不是很熟悉 CSP 指令,也没有找到关于 cdvfile 是什么的信息。我的问题是,我可以在我的网站上进行任何更改以满足安全策略吗?显然这个页面以前是工作的(我没有构建这个页面,但我现在支持它),所以我不确定我支持的这个站点或远程站点是否发生了某些变化。

您的 CSP 允许 atticangel.com,但您的 URL 是 www.atticangel.com.

如果你删除 "www." 它会起作用:https://atticangel.org/work-here/job-openings

...所以我建议将 www.atticangel.com 添加到您的 frame-ancestors CSP