fix(webui): explicitly specify websocket protocol #2578
@ -28,7 +28,8 @@ const sendAuth = isRegister => {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function openWebSocket() {
 | 
					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 = () => {
 | 
					    window.ws.onopen = () => {
 | 
				
			||||||
        ws_is_open = true;
 | 
					        ws_is_open = true;
 | 
				
			||||||
        sendAuth(false);
 | 
					        sendAuth(false);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user