diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2021-07-02 13:28:31 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2021-07-12 10:08:31 +0200 |
| commit | f0ed4859e55b46b1fd276e02e4d82fbca4762033 (patch) | |
| tree | 885bf287a779c9f973f5393377996a0284ef1428 /gui/src | |
| parent | 12151734ecb79858c81788f99f2184d4bc10feed (diff) | |
| download | mullvadvpn-f0ed4859e55b46b1fd276e02e4d82fbca4762033.tar.xz mullvadvpn-f0ed4859e55b46b1fd276e02e4d82fbca4762033.zip | |
Remove use of dev-server since dev-tools now work for file:// URLs
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}`); } |
