diff --git a/src/js/background.js b/src/js/background.js index 4f58062..300091e 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -101,6 +101,7 @@ var requestStatsFactory = function() { */ var rawSettingsDefault = { + disableCSPReportInjection: false, placeholderBackground: [ 'url("data:image/png;base64,', diff --git a/src/js/storage.js b/src/js/storage.js index 674d059..7bb2a13 100644 --- a/src/js/storage.js +++ b/src/js/storage.js @@ -126,6 +126,8 @@ value = true; } else if ( value === 'false' ) { value = false; + } else { + value = this.rawSettingsDefault[name]; } break; case 'string': diff --git a/src/js/traffic.js b/src/js/traffic.js index 36d732a..9bfd373 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -322,7 +322,7 @@ var onHeadersReceived = function(details) { if ( µm.tMatrix.evaluateSwitchZ('no-workers', rootHostname) ) { csp.push(µm.cspNoWorker); - } else { + } else if ( µm.rawSettings.disableCSPReportInjection === false ) { cspReport.push(µm.cspNoWorker); }