Skip to content

Commit

Permalink
Support ws also for httpS
Browse files Browse the repository at this point in the history
  • Loading branch information
campos20 committed Oct 20, 2020
1 parent 34ffeff commit 707b92a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tnoodle-ui/src/main/api/tnoodle.socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ export class ScrambleClient {
}

let wsTNoodleBackend = new URL(tNoodleBackend);
wsTNoodleBackend.protocol = "ws:";
wsTNoodleBackend.protocol =
window.location.protocol === "https:" ? "wss" : "ws";

const BASE_URL = wsTNoodleBackend.toString().replace(/\/$/g, "");

Expand Down

0 comments on commit 707b92a

Please sign in to comment.