summaryrefslogtreecommitdiffhomepage
path: root/gui/src/main
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2021-07-12 10:09:43 +0200
committerOskar Nyberg <oskar@mullvad.net>2021-07-12 10:09:43 +0200
commit51c3233e7f2f7dbf11f11345b378ff58190b72fc (patch)
treed98f0670439d2e208028e532041635c0d862196a /gui/src/main
parent2f303f7158be3256f94ad437b72ab8628cfceaee (diff)
parentffe0c6e418001f532469ce307edea7b82a663cdd (diff)
downloadmullvadvpn-51c3233e7f2f7dbf11f11345b378ff58190b72fc.tar.xz
mullvadvpn-51c3233e7f2f7dbf11f11345b378ff58190b72fc.zip
Merge branch 'update-to-electron-11.4.9'
Diffstat (limited to 'gui/src/main')
-rw-r--r--gui/src/main/index.ts21
1 files changed, 7 insertions, 14 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts
index 8b047cb6c3..8cacf4a7b7 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}`);
}
@@ -1091,8 +1085,6 @@ class ApplicationMain {
guiSettings: this.guiSettings.state,
wireguardPublicKey: this.wireguardPublicKey,
translations: this.translations,
- platform: process.platform,
- runningInDevelopment: process.env.NODE_ENV === 'development',
windowsSplitTunnelingApplications: this.windowsSplitTunnelingApplications,
}));
@@ -1588,10 +1580,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 +1603,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}`);
}