php - 内容安全策略 Internet Explorer 错误

标签 php nginx content-security-policy

我添加了 Content-Security-Policy,它在 Chrome、Firefox 和 Opera 上工作正常,但在 Internet Explorer 11 上我有这个错误“无法显示此页面”

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 的工作

为什么我只在 IE 上出现这个错误?谢谢你

最佳答案

引用caniuse内容安全策略仅通过 X-Content-Security-Policy header 得到部分支持,而不是通过标准的 Content-Security-Policy header 得到支持。尝试在 IE 中使用 X-Content-Security-Policy header ...

关于php - 内容安全策略 Internet Explorer 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33736665/

相关文章:

php - Elgg白屏: undefined function Elgg\\mysql_connect()

html - 如何通过Content-Security-Policy检查哪些内容被阻止了?

ssl - 如何使用SSL HTTPS在Amazon EC2 AWS中保护Nginx前端和Puma后端

javascript - Chrome 扩展程序弹出窗口不起作用,点击事件未处理

http - 内容安全策略不起作用

php - Symfony 2.4 - 重复表单字段 - 当值不匹配时,如何将违规映射到第二个字段?

php - 调用 .getJSON 时 Symfony 返回 404 错误

PHP/MYSQL插入数组foreach循环

ssl - 在 Jelastic 的容器外使用 SSL 证书文件

ubuntu - nginx -> php5-fpm : Error in php not logged (anywhere! )