Browse Source

Fix insecure content errors when loading content from `chrome-extension`

Alexandre Lachèze 7 years ago
parent
commit
5eb4b9ad6f
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lib/renderer/content-scripts-injector.js

+ 3 - 1
lib/renderer/content-scripts-injector.js

@@ -1,6 +1,8 @@
-const {ipcRenderer} = require('electron')
+const {ipcRenderer, webFrame} = require('electron')
 const {runInThisContext} = require('vm')
 
+webFrame.registerURLSchemeAsPrivileged('chrome-extension')
+
 // Check whether pattern matches.
 // https://developer.chrome.com/extensions/match_patterns
 const matchesPattern = function (pattern) {