mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2025-01-09 19:48:37 +01:00
use relative wss url
This commit is contained in:
parent
d40d7d594c
commit
0ffb17b15a
@ -9,7 +9,9 @@ if (urlParams.get("mcauth_success") == "false") {
|
||||
|
||||
// WS
|
||||
function defaultWs() {
|
||||
return window.location.host == "viaversion.github.io" || !window.location.host ? "wss://localhost:25543/ws" : "wss://" + window.location.host + "/ws";
|
||||
let url = new URL("ws", new URL(location));
|
||||
url.protocol = "wss";
|
||||
return window.location.host == "viaversion.github.io" || !window.location.host ? "wss://localhost:25543/ws" : url.toString();
|
||||
}
|
||||
function getWsUrl() {
|
||||
let url = localStorage.getItem("ws-url") || defaultWs();
|
||||
|
Loading…
Reference in New Issue
Block a user