fix issues

This commit is contained in:
2026-07-22 17:25:07 +08:00
parent 981f9ed4bf
commit 9183308769
3 changed files with 12 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ const clients = new Map();
function init(wss) {
wss.on('connection', (ws, req) => {
console.log('✅ WebSocket 客户端已连接');
//console.log('✅ WebSocket 客户端已连接');
const url = new URL(req.url, 'http://localhost');
const token = url.searchParams.get('token');
if (!token) return ws.close();