简体   繁体   English

CSP 限制,但未在 HTML 或 HTTP 标头中指定

[英]CSP restrictions, but none specified in HTML or HTTP headers

I get Content Security Policy errors such as:我收到内容安全策略错误,例如:

Firefox: Content Security Policy: The page's settings blocked... Firefox:内容安全策略:页面的设置被阻止...

Chrome: ... violates the following Content Security Policy directive... Chrome:……违反了以下内容安全政策指令……

But I don't have any <meta http-equiv="Content-Security-Policy"...> in the HTML, nor any Content-Security-Policy headers in the HTTP responses.但是我在 HTML 中没有任何<meta http-equiv="Content-Security-Policy"...> ,在 HTTP 响应中也没有任何Content-Security-Policy标头。 Where else could it be set and/or how do I debug this with the browser's dev tools?它还能在哪里设置和/或如何使用浏览器的开发工具进行调试?

It can also be caused by browser extensions that can add Content Security Policies to your page, especially advertisement and content blockers.它也可能是由可以将内容安全策略添加到您的页面的浏览器扩展引起的,尤其是广告和内容拦截器。 In my case it was caused by specific configurations of uMatrix which I had been using for testing.就我而言,这是由我一直用于测试的 uMatrix 的特定配置引起的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM