From d3fc061596681530e324706a20a8a23582bf42d4 Mon Sep 17 00:00:00 2001 From: Erastus Amunwe Date: Sat, 24 Oct 2020 02:31:01 +0200 Subject: [PATCH] disabled web security to allow cors --- src/background.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/background.js b/src/background.js index 5a2ae9c..9ec4585 100644 --- a/src/background.js +++ b/src/background.js @@ -20,6 +20,7 @@ function createWindow() { width: 800, height: 600, webPreferences: { + webSecurity: false, // Use pluginOptions.nodeIntegration, leave this alone // See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION @@ -29,7 +30,7 @@ function createWindow() { if (process.env.WEBPACK_DEV_SERVER_URL) { // Load the url of the dev server if in development mode win.loadURL(process.env.WEBPACK_DEV_SERVER_URL) - // if (!process.env.IS_TEST) win.webContents.openDevTools() + if (!process.env.IS_TEST) win.webContents.openDevTools() } else { createProtocol('app') // Load the index.html when not in development