Chrome 添加 header Content-Security-Policy-Report-Only

Chrome adds header Content-Security-Policy-Report-Only

我有一个(强制的)CSP 政策,其中包含 worker-srcreport-uri

出于某种原因,当使用 Chrome (80.0.3987.122) 加载站点时,“网络”选项卡还显示 header Content-Security-Policy-Report-Only: worker-src 'none'; report-uri about:blank.

这与我的 Content-Security-Policy header 中的设置冲突,阻止加载服务工作者(并向控制台记录有关无效 report-uri 的错误)。

当我用 Firefox 加载同一个站点时,我没有看到这个神秘的额外内容 header。

有没有人经历过类似的事情?这是预期的行为吗?

这是由 uMatrix, more details can be found here 的 CSP 注入功能引起的。

请注意,此设置必须设置为 true 才能禁用额外的 Content-Security-Policy-Report-Only header。