Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Template
Description
由于环境变量
GATEWAY
URL地址末尾多加了个/
导致的Socket连接失败错误信息
无法正常显示网页在线人数
Socket.io connection error: Invalid namespace.
排查过程
前端由Vercel直接Fork部署、
服务端首先检查nginx的配置文件,反向代理支持socket连接、WebSocket 在线测试工具测试相关配置都没问题后
根据浏览器的抓包数据,发现路径多添加了一个
/
,已针对修复。Linked Issues
Additional context
添加对shocket路径的检查
GATEWAY_URL
的检查,并对其进行适当处理。已测试正常