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

分享
71 3

问题描述

在CQHTTP机器人运行日志中报错如下

websocket: the client is not using the websocket protocol: ‘upgrade’ token not found in ‘Connection’ head,客户端没有使用websocket协议:'upgrade'令牌未在'Connection'头中找到

错误分析

当反向代理或负载均衡未正确传递WebSocket请求时,就会出现此问题。

解决方案

Nginx加上以下解析

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade
最后更新 2023-05-03
评论 ( 3 )
OωO
隐私评论
  1. 24123434

    8天前广东省江门市回复
  2. 测试评论通知

    8天前广东省江门市回复
  3. 测试评论通知

    8天前广东省江门市回复