Browse Source

add mitigation for #912

pull/2/head
Raymond Hill 7 years ago
parent
commit
1228ee55d6
No known key found for this signature in database GPG Key ID: 25E1490B761470C2
  1. 1
      src/js/background.js
  2. 2
      src/js/storage.js
  3. 2
      src/js/traffic.js

1
src/js/background.js

@ -101,6 +101,7 @@ var requestStatsFactory = function() {
*/
var rawSettingsDefault = {
disableCSPReportInjection: false,
placeholderBackground:
[
'url("data:image/png;base64,',

2
src/js/storage.js

@ -126,6 +126,8 @@
value = true;
} else if ( value === 'false' ) {
value = false;
} else {
value = this.rawSettingsDefault[name];
}
break;
case 'string':

2
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);
}

Loading…
Cancel
Save