]> Untitled Git - lemmy.git/commitdiff
Fixing endpoint.
authorDessalines <tyhou13@gmx.com>
Tue, 9 Apr 2019 15:03:58 +0000 (08:03 -0700)
committerDessalines <tyhou13@gmx.com>
Tue, 9 Apr 2019 15:03:58 +0000 (08:03 -0700)
ui/src/env.ts

index 03594bc68626291d3f8504b45f99141cf41844f7..aebbc57f6604f54f909c639b94ad989bd4b69a2a 100644 (file)
@@ -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`;