From: Dessalines Date: Tue, 9 Apr 2019 15:03:58 +0000 (-0700) Subject: Fixing endpoint. X-Git-Url: http://these/git/%22%7Burl%7D/%7B%60%24%7BghostArchiveUrl%7D/%7BjoinLemmyUrl%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`;