WebSocket connection to “wss://xxx/xxx“ failed

用了https后,需要用nginx作websocket地址的转发才能使用wss,别直接用端口访问 

	location /ws/ {
		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection "Upgrade";	
		proxy_pass http://localhost:10001/ws/;
    }

WebSocket connection to “wss://xxx/xxx“ failed_第1张图片

 WebSocket connection to “wss://xxx/xxx“ failed_第2张图片

 WebSocket connection to “wss://xxx/xxx“ failed_第3张图片

 

你可能感兴趣的:(websocket,网络协议,网络)