fix(server): increase server acceptable websocket payload size

This commit is contained in:
forehalo 2023-11-10 21:31:45 +08:00 committed by LongYinan
parent 7525126d89
commit dc8e84df31
No known key found for this signature in database
GPG Key ID: C3666B7FC82ADAD7

View File

@ -50,6 +50,8 @@ type EventResponse<Data = any> =
@WebSocketGateway({
cors: process.env.NODE_ENV !== 'production',
transports: ['websocket'],
// see: https://socket.io/docs/v4/server-options/#maxhttpbuffersize
maxHttpBufferSize: 1e8, // 100 MB
})
export class EventsGateway implements OnGatewayConnection, OnGatewayDisconnect {
protected logger = new Logger(EventsGateway.name);