修复WebSocket身份认证问题

- 添加WebSocketAuthInterceptor处理token认证
- 修改WebSocket连接逻辑,支持token传递
- 统一用户身份识别,确保登录用户使用USER类型
- 修复前端环境变量配置,统一WebSocket URL
- 添加Token测试页面用于验证功能
- 更新聊天消息处理逻辑,正确识别用户身份

解决了登录用户发送消息时同时保存GUEST和USER两种类型数据的问题
This commit is contained in:
2025-07-24 17:51:38 +08:00
parent 6560e66959
commit 847f5126cf
30 changed files with 1447 additions and 216 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ export default defineConfig({
open: true,
proxy: {
'/api': {
target: 'http://localhost:8080',
target: 'http://localhost:19089',
changeOrigin: true,
rewrite: (path) => path
}