Issue #2405 - Add a pref to disable CSP reporting.

Resolves #2405
This commit is contained in:
Moonchild 2023-12-17 22:56:04 +01:00 • committed by roytam1
commit f1f9dde29e
4 changed files with 17 additions and 2 deletions

View file

@ -25,12 +25,15 @@ using namespace mozilla;
/* Keeps track of whether or not CSP is enabled */
bool CSPService::sCSPEnabled = true;
/* Keeps track of whether or not CSP reporting is enabled */
bool CSPService::sCSPReportingEnabled = true;
static LazyLogModule gCspPRLog("CSP");
CSPService::CSPService()
{
Preferences::AddBoolVarCache(&sCSPEnabled, "security.csp.enable");
Preferences::AddBoolVarCache(&sCSPReportingEnabled, "security.csp.reporting.enabled");
}
CSPService::~CSPService()