add verify before ws connection
This commit is contained in:
parent
a3a4f2b5cb
commit
a1bcd06acd
@ -119,11 +119,7 @@ const wss = new WebSocketServer(
|
||||
port: 8282,
|
||||
verifyClient: (info, callback) => {
|
||||
console.log(info.req.url);
|
||||
|
||||
const ok = verifyToken(info.req.url || '');
|
||||
|
||||
console.log(ok);
|
||||
|
||||
const ok = verifyToken(info.req.url || '');
|
||||
|
||||
if (!ok) {
|
||||
callback(false, 401, 'Unauthorized: Invalid token');
|
||||
|
Loading…
x
Reference in New Issue
Block a user