fix(webui): explicitly specify websocket protocol (#2578)
apparently some browsers (e.g. 2 year old chrome) need this to establish a connection. can't hurt, anyway. Reviewed-on: OpenWF/SpaceNinjaServer#2578 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									a29398fae6
								
							
						
					
					
						commit
						7e618539fa
					
				@ -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);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user