This commit is contained in:
2023-06-08 22:47:46 +08:00
parent 2002dd4749
commit 7b5ba18d89
11 changed files with 193 additions and 34 deletions

4
server/utils.ts Normal file
View File

@@ -0,0 +1,4 @@
export function get_ws_host() {
const protocol = document.location.protocol === "https:" ? "wss:" : "ws:";
return `${protocol}//${document.location.host}`;
}