Explicitly disable nodeIntegration in service workers

This commit is contained in:
Scott Nonnenberg 2018-05-18 17:52:20 -07:00
parent 01be58acc2
commit a593a148e8
1 changed files with 2 additions and 0 deletions

View File

@ -188,6 +188,7 @@ function createWindow() {
autoHideMenuBar: false,
webPreferences: {
nodeIntegration: false,
nodeIntegrationInWorker: false,
// sandbox: true,
preload: path.join(__dirname, 'preload.js'),
},
@ -415,6 +416,7 @@ function showAbout() {
show: false,
webPreferences: {
nodeIntegration: false,
nodeIntegrationInWorker: false,
preload: path.join(__dirname, 'preload.js'),
},
parent: mainWindow,