From 1fb7c96fbceb01760fa7c1aeac19abf633f026e7 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Mon, 28 Jun 2021 20:29:43 +0930 Subject: [PATCH] fix: don't fail if missing extra origin file --- app/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/server.ts b/app/server.ts index 2f758266e..57d9208f0 100644 --- a/app/server.ts +++ b/app/server.ts @@ -67,7 +67,7 @@ const hash = certPem ? pki.certificateFromPem(certPem).subject.hash : undefined; // Get extra origins from the user const extraOriginPath = paths.get('extra-origins'); // To add extra origins create a file at the "extra-origins" path -const extraOrigins = extraOriginPath ? attemptJSONParse(fs.readFileSync(extraOriginPath, 'utf-8'), []) : []; +const extraOrigins = extraOriginPath ? attemptJSONParse(attemptReadFileSync(extraOriginPath, ''), []) : []; // Get local ip from first ethernet adapter in the "network" state const localIp = networkState.data[0].ipaddr[0];