Skip to content

Commit

Permalink
Merge pull request HalseySpicy#214 from Tanimodori/main
Browse files Browse the repository at this point in the history
fix: allows electron security warnings, see HalseySpicy#199
  • Loading branch information
caoxiemeihao authored Jul 25, 2022
2 parents 6005d6f + 9ef141f commit bfe73fe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion electron/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ if (!app.requestSingleInstanceLock()) {
process.exit(0)
}

process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'
// Remove electron security warnings
// This warning only shows in development mode
// Read more on https://www.electronjs.org/docs/latest/tutorial/security
// process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'

export const ROOT_PATH = {
// /dist
Expand All @@ -35,6 +38,9 @@ async function createWindow() {
icon: join(ROOT_PATH.public, 'favicon.ico'),
webPreferences: {
preload,
// Warning: Enable nodeIntegration and disable contextIsolation is not secure in production
// Consider using contextBridge.exposeInMainWorld
// Read more on https://www.electronjs.org/docs/latest/tutorial/context-isolation
nodeIntegration: true,
contextIsolation: false,
},
Expand Down

0 comments on commit bfe73fe

Please sign in to comment.