From ea68758328ca993b42b5cd6f36f838358ee9f377 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Mon, 28 Jun 2021 21:13:20 +0930 Subject: [PATCH] fix: origins --- app/server.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/server.ts b/app/server.ts index 57d9208f0..0fc7c28f3 100644 --- a/app/server.ts +++ b/app/server.ts @@ -72,15 +72,12 @@ const extraOrigins = extraOriginPath ? attemptJSONParse(attemptReadFileSync(extr // Get local ip from first ethernet adapter in the "network" state const localIp = networkState.data[0].ipaddr[0]; -// Get webui port -const originPort = varState.data.port; - // Allow http://tower.local:${port}, http://${ip}:${port} and https://${hash}.unraid.net:${port} const allowedOrigins = [ // The webui 'http://tower.local', - `http://${localIp}${originPort}`, - ...(hash ? [`https://${hash}.unraid.net:${originPort}`] : []), + `http://${localIp}`, + ...(hash ? [`https://${hash}.unraid.net`] : []), // Other endpoints should be added below ...extraOrigins