fix(webui): explicitly specify websocket protocol
All checks were successful
Build / build (pull_request) Successful in 1m17s

apparently some browsers need this to establish a connection, tho I failed to repro it
This commit is contained in:
Sainan 2025-07-31 20:53:41 +02:00
parent a29398fae6
commit c9f628e50e

View File

@ -28,7 +28,8 @@ const sendAuth = isRegister => {
};
function openWebSocket() {
window.ws = new WebSocket("/custom/ws");
const wsProto = location.protocol === "https:" ? "wss://" : "ws://";
window.ws = new WebSocket(wsProto + location.host + "/custom/ws");
window.ws.onopen = () => {
ws_is_open = true;
sendAuth(false);