關於signalr 線上https 環境報錯Error: Failed to start the transport 'WebSockets': null 的解決方案:
1、問題
本地http與https 連接無異常,但是前端通過nginx轉發訪問,會報異常
2、原因
nginx 默認不支持websockets
3、解決方案:
在對應訪問的域名下添加如下配置:
proxy_pass http://backend;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
f you have you app in Windows Server just enable thw "WebSocket Protocol".