4
2
Fork 0

disabled web security to allow cors

This commit is contained in:
Erastus Amunwe 2020-10-24 02:31:01 +02:00
parent 1d424e532f
commit d3fc061596
1 changed files with 2 additions and 1 deletions

View File

@ -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