- 删除 auth.middleware.ts 中的 console.log 调试语句,清理生产环境代码
@@ -15,7 +15,6 @@ export const createSocketAuthMiddleware = () => {
return async (socket: AuthenticatedSocket, next: (err?: Error) => void) => {
try {
// 获取 token
- console.log('socket.handshake',socket.handshake)
const token = socket.handshake.auth?.token || socket.handshake.query?.socket_token;
if (!token) {