4
2
mirror of https://github.com/getbible/app.git synced 2024-12-22 15:58:55 +00:00

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

View File

@ -20,6 +20,7 @@ function createWindow() {
width: 800, width: 800,
height: 600, height: 600,
webPreferences: { webPreferences: {
webSecurity: false,
// Use pluginOptions.nodeIntegration, leave this alone // Use pluginOptions.nodeIntegration, leave this alone
// See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info // See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION
@ -29,7 +30,7 @@ function createWindow() {
if (process.env.WEBPACK_DEV_SERVER_URL) { if (process.env.WEBPACK_DEV_SERVER_URL) {
// Load the url of the dev server if in development mode // Load the url of the dev server if in development mode
win.loadURL(process.env.WEBPACK_DEV_SERVER_URL) 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 { } else {
createProtocol('app') createProtocol('app')
// Load the index.html when not in development // Load the index.html when not in development