WebSocket 和HTTP虽然是不同协议,但是两者“握手”方式兼容。通过HTTP升级机制,使用HTTP的Upgrade和Connection协议头的方式可以将连接从HTTP升级为WebSocket。
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
标签:Upgrade,HTTP,header,nginx,upgrade,proxy,http,线上,websock From: https://www.cnblogs.com/littlewrong/p/16925007.html