fix(webui): explicitly specify websocket protocol #2578

Merged
Sainan merged 1 commits from webui-proto into main 2025-08-01 03:47:15 -07:00

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);