From 85d16e8632f7cf44100d75cde4d89bfe986f4cbc Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 9 Apr 2019 08:03:58 -0700 Subject: [PATCH] Fixing endpoint. --- ui/src/env.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/src/env.ts b/ui/src/env.ts index 03594bc6..aebbc57f 100644 --- a/ui/src/env.ts +++ b/ui/src/env.ts @@ -1,2 +1,4 @@ -export const endpoint = `${window.location.hostname}:8536`; +let host = `${window.location.hostname}`; +let port = `${window.location.port == "4444" ? '8536' : window.location.port}`; +let endpoint = `${host}:${port}`; export let wsUri = `${(window.location.protocol=='https:') ? 'wss://' : 'ws://'}${endpoint}/service/ws`;