diff options
Diffstat (limited to 'gui/src')
| -rw-r--r-- | gui/src/main/index.ts | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index 8b047cb6c3..4377b0a9b2 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -503,13 +503,7 @@ class ApplicationMain { const filePath = path.resolve(path.join(__dirname, '../renderer/index.html')); try { - if (process.env.NODE_ENV === 'development') { - await this.windowController.window.loadURL( - 'http://localhost:8080/src/renderer/index.html', - ); - } else { - await this.windowController.window.loadFile(filePath); - } + await this.windowController.window.loadFile(filePath); } catch (error) { log.error(`Failed to load index file: ${error.message}`); } @@ -1588,10 +1582,8 @@ class ApplicationMain { private allowDevelopmentRequest(url: string): boolean { return ( process.env.NODE_ENV === 'development' && - // Local web server providing assests (index.html, index.js and css files) - (url.startsWith('http://localhost:8080/') || - // Downloading of React and Redux developer tools. - url.startsWith('devtools://devtools/') || + // Downloading of React and Redux developer tools. + (url.startsWith('devtools://devtools/') || url.startsWith('chrome-extension://') || url.startsWith('https://clients2.google.com') || url.startsWith('https://clients2.googleusercontent.com')) @@ -1613,7 +1605,10 @@ class ApplicationMain { const forceDownload = !!process.env.UPGRADE_EXTENSIONS; for (const name of extensions) { try { - await installer.default(installer[name], forceDownload); + await installer.default(installer[name], { + forceDownload, + loadExtensionOptions: { allowFileAccess: true }, + }); } catch (e) { log.info(`Error installing ${name} extension: ${e.message}`); } |
