Add production deployment

This commit is contained in:
2025-08-23 17:17:03 +03:00
Unverified
parent 5b7ba90628
commit 320c6bbe95
11 changed files with 214 additions and 3 deletions
+6 -1
View File
@@ -17,7 +17,12 @@ import { delay } from "./utils/utils";
* @private
*/
function create(): WebSocket {
return new WebSocket(`ws://${API_FULL_BASE_URL}/chat/ws`);
let prefix = "ws://";
if (location.protocol.includes("https")) {
prefix = "wss://";
}
return new WebSocket(`${prefix}${API_FULL_BASE_URL}/chat/ws`);
}
/**