4.2.9 命名空间中间件函数 namespace_use_fn
io.use((socket,next)=>{
if (socket.request.header.cookie) return next();
next(new Error('authentication error'));
})Last updated
Was this helpful?
io.use((socket,next)=>{
if (socket.request.header.cookie) return next();
next(new Error('authentication error'));
})Last updated
Was this helpful?
Was this helpful?