内容安全政策Internet Explorer错误 [英] Content Security Policy Internet explorer error

查看:118
本文介绍了内容安全政策Internet Explorer错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我添加了Content-Security-Policy,它可以在Chrome,Firefox和Opera中正常工作,但是在Internet Explorer 11中却出现此错误无法显示此页面"

I add Content-Security-Policy its work fine with Chrome, Firefox and Opera but with Internet Explorer 11 i have this error "This page can’t be displayed"

add_header Content-Security-Policy "connect-src 'self' wss://example.com/ws/;
                                    script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.google-analytics.com https://www.google.com https://www.gstatic.com/recaptcha/api2/recaptcha__en.js https://ajax.cloudflare.com/cdn-cgi/nexp/cloudflare.min.js;
                                    frame-src 'self' https://www.terminal.com/embed/chart-widget/ https://www.google.com/recaptcha/;
                                    img-src 'self' https://www.google-analytics.com https://chart.googleapis.com https://shape.com;
                                    ";

如果我在本节中评论它与IE的合作

if i comment this section its work with IE

为什么我只有IE会出现此错误?谢谢你

Why i have this error only with IE ? Thanks you

推荐答案

引用 caniuse 内容安全X-Content-Security-Policy标头仅部分支持策略,但标准Content-Security-Policy标头不支持该策略.尝试在IE中使用X-Content-Security-Policy标头...

Refering to caniuse content security policy is only partially supported through the X-Content-Security-Policy header, but not through the standard Content-Security-Policy header. Try using X-Content-Security-Policy header in IE...

这篇关于内容安全政策Internet Explorer错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆