客户端没有使用websocket协议:'upgrade'令牌未在'Connection'头中找到

错误:websocket: the client is not using the websocket protocol: ‘upgrade’ token not found in ‘Connection’ head
当反向代理或负载平衡器未正确传递WebSocket请求时,就会出现此问题。以下是解决此问题的说明。
For Nginx

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade

For Apache:

 
     ProxyPass ws://localhost:8000
     ProxyPassReverse ws://localhost:8000/
 

你可能感兴趣的:(nginx,websocket)