fix ws protocol
This commit is contained in:
parent
09f1500439
commit
366aa9f2b0
|
@ -72,7 +72,7 @@
|
|||
document.getElementById("msgBox").value = "";
|
||||
});
|
||||
|
||||
const ws = new WebSocket("ws://" + window.location.host);
|
||||
const ws = new WebSocket("ws" + (window.location.protocol === "https:" ? "s" : "") + "://" + window.location.host);
|
||||
ws.addEventListener("message", ({ data: msg }) => {
|
||||
console.log(msg);
|
||||
|
||||
|
|
Loading…
Reference in New Issue