From: Dessalines Date: Tue, 9 Apr 2019 15:03:58 +0000 (-0700) Subject: Fixing endpoint. X-Git-Url: http://these/git/%7B%60/static/assets/css/themes/%24%7BappleTouchIcon%7D?a=commitdiff_plain;h=8aa58e479eb742d192a17b7511c0bbce5fc7d534;p=lemmy.git Fixing endpoint. --- 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`;