fix: ws token not work

This commit is contained in:
linyuchen
2024-04-18 17:43:43 +08:00
parent 33e63e5f1c
commit 8a9f374637
2 changed files with 6 additions and 1 deletions

View File

@@ -17,6 +17,12 @@ import { selfInfo } from '@/common/data';
const heartbeatRunning = false;
class OB11WebsocketServer extends WebsocketServerBase {
public start(port: number) {
this.token = ob11Config.token;
super.start(port);
}
authorizeFailed(wsClient: WebSocket) {
wsClient.send(JSON.stringify(OB11Response.res(null, 'failed', 1403, 'token验证失败')));
}