Skip to content

Commit

Permalink
Add url query parameters to websocket url.
Browse files Browse the repository at this point in the history
Fixes H-M-H#286, that is connecting with an access code set.
  • Loading branch information
H-M-H committed Sep 25, 2024
1 parent ffa05da commit 55ebfb4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ts/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,10 @@ function init() {
check_apis();

let protocol = document.location.protocol == "https:" ? "wss://" : "ws://";
let webSocket = new WebSocket(protocol + window.location.hostname + ":" + window.location.port + "/ws");
let webSocket = new WebSocket(
protocol + window.location.hostname + ":" +
window.location.port + "/ws" + window.location.search
);
webSocket.binaryType = "arraybuffer";

settings = new Settings(webSocket);
Expand Down

0 comments on commit 55ebfb4

Please sign in to comment.