small bug fix with sockets and auth
This commit is contained in:
@@ -12,6 +12,8 @@ export default defineEventHandler(({ node }) => {
|
||||
global.io.on('connection', async (socket: Socket) => {
|
||||
const token = socket.handshake.auth.token;
|
||||
|
||||
console.log(token);
|
||||
|
||||
if (!token) {
|
||||
socket.disconnect();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user