fix issues
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user