Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(electron): flip the switch for node integration & context isolation
Elian Doranf453cb0c7a2f
diff --git a/apps/server/src/services/window.ts b/apps/server/src/services/window.tsindex 4b064b0622..f258bdca67 100644--- a/apps/server/src/services/window.ts+++ b/apps/server/src/services/window.ts@@ -56,8 +56,8 @@ async function createExtraWindow(extraWindowHash: string) {height: 800,title: "Trilium Notes",webPreferences: {- nodeIntegration: true,- contextIsolation: false,+ nodeIntegration: false,+ contextIsolation: true,spellcheck: spellcheckEnabled,webviewTag: true},@@ -119,8 +119,8 @@ async function createMainWindow(app: App) {minHeight: 400,title: "Trilium Notes",webPreferences: {- nodeIntegration: true,- contextIsolation: false,+ nodeIntegration: false,+ contextIsolation: true,spellcheck: spellcheckEnabled,webviewTag: true},@@ -241,9 +241,8 @@ async function createSetupWindow() {...(isWindows && { backgroundMaterial: "mica" as const }),...(isMac && { transparent: true, visualEffectState: "active" as const, vibrancy: "under-window" as const, titleBarStyle: "hiddenInset" as const }),webPreferences: {- // necessary for e.g. utils.isElectron()- nodeIntegration: true,- contextIsolation: false+ nodeIntegration: false,+ contextIsolation: true}});setupWindow.removeMenu();