内容安全政策 - child-src

时间:2015-11-26 12:10:41

标签: apache content-security-policy

我有以下问题:

在我的oxid商店中,当我尝试在某个点保存时,我收到以下错误:

  

无法处理未知指令'child-src'。

我在不同的服务器上尝试过,一切正常。我刚刚获取了标题(在发生故障的服务器上)以查看CSP,这是输出:

X-Content-Security-Policy: default-src 'self';    script-src 'self' 'unsafe-inline' 'unsafe-eval' *.nrw.de *.google.com *.twimg.com;    style-src 'self' 'unsafe-inline' *.nrw.de *.twitter.com;    font-src 'self' *.example.org;    img-src data: *.example.org;    child-src *.example.org *.nrw.de *.facebook.com *.facebook.de *.twitter.com *.google.com;    frame-src *.example.org *.nrw.de *.facebook.com *.facebook.de *.twitter.com *.google.com;    object-src 'none';    media-src *.example.org;

content-security-policy: default-src 'self';    script-src 'self' 'unsafe-inline' 'unsafe-eval' *.nrw.de *.google.com *.twimg.com;    style-src 'self' 'unsafe-inline' *.example.org *.twitter.com;    font-src *;    img-src data: *.example.org;    child-src *.example.org *.nrw.de *.facebook.com *.facebook.de *.twitter.com *.google.com;    frame-src *.example.org *.nrw.de *.facebook.com *.facebook.de *.twitter.com *.google.com;    object-src 'none';    media-src *.example.org;

有什么想法吗?需要更多信息?

提前致谢

1 个答案:

答案 0 :(得分:0)

"子-SRC"是Content-Security-Policy第2版中引入的新指令。请参阅http://www.w3.org/TR/CSP2/

上的规范

大多数浏览器现在支持v1,但并非所有支持v2。请参阅此页面了解兼容性详情 http://caniuse.com/#feat=contentsecuritypolicy2

浏览器应该忽略他们不支持的任何指令

你说你尝试过不同的服务器并获得了不同的结果。您使用相同的浏览器,还是使用不同的浏览器?它可能是一个有所作为的浏览器。

相关问题