fix: fix a problem which make disableMsgpack not work

pull/249/head
moonrailgun 9 months ago
parent 22656c64ef
commit 61184d1e59

@ -59,6 +59,11 @@ interface TcSocketIOServiceOptions {
* token
*/
userAuth: (token: string) => Promise<UserJWTPayload>;
/**
* msgpack
*/
disableMsgpack?: boolean;
}
/**
@ -541,7 +546,7 @@ export const TcSocketIOService = (
origin: '*',
methods: ['GET', 'POST'],
},
parser: msgpackParser,
parser: options.disableMsgpack ? undefined : msgpackParser,
});
if (

@ -42,6 +42,7 @@ export default class ApiService extends TcService {
return user;
},
disableMsgpack: config.feature.disableMsgpack,
})
);
this.registerMixin(TcHealth());

Loading…
Cancel
Save