main: add context bridge communication example via preload script, set nodeIntegration to false by default, improve security

This commit is contained in:
leejooy96 committed 2023-02-01 09:38:23 +09:00
1 parent a540caf9d3
commit 8057a3521a
9 files changed
+64 -12

No files matched your search

+8 -4
View File
@@ -1,16 +1,20 @@
import { join } from 'path'
import { name, version } from '../../../package.json'
export default class Constants {
static APP_NAME = 'Vutron'
// Display app name (uppercase first letter)
static APP_NAME = name.charAt(0).toUpperCase() + name.slice(1)
static APP_VERSION = version
static IS_DEV_ENV = process.env.NODE_ENV === 'development'
static IS_MAC = process.platform === 'darwin'
static DEFAULT_WEB_PREFERENCES = {
nodeIntegration: true,
contextIsolation: false,
nodeIntegrationInWorker: true,
nodeIntegration: false,
contextIsolation: true,
enableRemoteModule: false,
preload: join(__dirname, '../preload/index.js')
}