Azure 上的 SignalR:连接握手失败

SignalR on Azure: Failed Connection Handshake

我的应用程序出现错误,导致通过 wss:// 的连接失败。

浏览器收到 200 状态代码,我在 ASP.NET 核心应用程序中看到日志行如下所示:

{"@t":"2019-09-06T16:46:58.0850696Z","@m":"Failed connection handshake.","@i":"ebdbcf97","@l":"Error","EventId":{"Id":5,"Name":"HandshakeFailed"},"SourceContext":"Microsoft.AspNetCore.SignalR.HubConnectionContext","TransportConnectionId":"qLt39WTMAY4t-Q4vyRTGrg","RequestId":"0HLPISG9A2QAE:00000006","RequestPath":"/hubs/results","CorrelationId":null,"ConnectionId":"0HLPISG9A2QAE"}

浏览器错误:

WebSocket connection to 'wss://frontend.env.company.com/hubs/results?id=qLt39WTMAY4t-Q4vyRTGrg' failed: Error during WebSocket handshake: Unexpected response code: 200

该应用程序 运行 在 Azure 上托管的 kubernetes 集群中的 nginx 后面。它前面是 Azure CDN,它将某些 / 路径路由到此 origin/endpoint.

如有任何帮助,我们将不胜感激。

谢谢!

解释是 Azure CDN with Premium Verizon 不支持 WebSockets。已经放弃将其作为解决方案并改用 nginx,效果非常好。