【发布时间】:2021-02-26 00:08:57
【问题描述】:
请帮忙!
我尝试在我的网站中添加嵌入的 youtube 视频,但由于以下错误而无法加载。如何在不修改默认 CSP 的情况下修改单个文件中的 CSP 标头(覆盖)。我只想修改这个 PHP 文件。
<iframe width="420" height="315"
src="https://www.youtube.com/embed/tgbNymZ7vqY">
</iframe>
Refused to frame 'https://www.youtube.com/' because it violates the following Content Security Policy directive: "default-src 'self'". Note that 'frame-src' was not explicitly set, so 'default-src' is used as a fallback.
【问题讨论】:
标签: javascript php html embed content-security-policy