fix wss
This commit is contained in:
@@ -358,7 +358,8 @@ function App() {
|
||||
const mainRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
const wsUrl = `ws://${window.location.host}/ws`;
|
||||
const wsProtocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
||||
const wsUrl = `${wsProtocol}//${window.location.host}/ws`;
|
||||
let ws: WebSocket;
|
||||
let reconnectTimer: ReturnType<typeof setTimeout>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user