特性: CSP 应允许同时使用 `Content-Security-Policy-Report-Only` 和 `Content-Security-Policy-Report-Only`
作者: thernstig创建于 2022年1月18日更新于 2025年11月2日
标签feedback wanted
目前有一个选项允许仅报告违规行为: options.reportOnly 是一个布尔值,默认为 false。如果为 true,将设置 Content-Security-Policy-Report-Only 头部。但是根据 https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP#testing_your_policy,应该允许同时包含 Content-Security-Policy 和 Content-Security-Policy-Report-Only 头部。
内容来源: helmetjs/helmet