diff options
author | Zhongheng Liu <z.liu@outlook.com.gr> | 2023-12-21 19:38:01 +0200 |
---|---|---|
committer | Zhongheng Liu <z.liu@outlook.com.gr> | 2023-12-21 19:38:01 +0200 |
commit | 8e99d4fa14afc562c969e5fac5c44e97ca4dff29 (patch) | |
tree | aeb666831878fbe758314a46d67eec7c2550c409 | |
parent | 6fc628aee3bf74351244df69594bab2ec66aa9d8 (diff) | |
download | epq-web-8e99d4fa14afc562c969e5fac5c44e97ca4dff29.tar.gz epq-web-8e99d4fa14afc562c969e5fac5c44e97ca4dff29.tar.bz2 epq-web-8e99d4fa14afc562c969e5fac5c44e97ca4dff29.zip |
dynamic websockets url resolve
-rw-r--r-- | src/Chat/Chat.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Chat/Chat.tsx b/src/Chat/Chat.tsx index 080ea71..6f1d0a8 100644 --- a/src/Chat/Chat.tsx +++ b/src/Chat/Chat.tsx @@ -3,7 +3,7 @@ import { Message } from "./Message"; import { Client, Stomp } from "@stomp/stompjs"; import { MessageType } from "./types"; import { renderToStaticMarkup } from 'react-dom/server'; -const domain = "localhost" +const domain = window.location.hostname const port = "8080" const connectionAddress = `ws://${domain}:${port}/ws` const ChatWrapper = ( |