From 940acc8b27c739cb3fb811aae38241333b7dd556 Mon Sep 17 00:00:00 2001 From: Jeremie Pardou <571533+jrmi@users.noreply.github.com> Date: Mon, 13 Nov 2023 10:09:14 +0100 Subject: [PATCH] Add max http size parameter --- src/cli.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cli.js b/src/cli.js index 763b709..84bffa2 100644 --- a/src/cli.js +++ b/src/cli.js @@ -9,12 +9,13 @@ export const SOCKET_PATH = process.env.WIREIO_SOCKET_PATH || process.env.SOCKET_PATH || '/socket.io'; export const SOCKET_COMPAT = ['1', 'true'].includes(process.env.SOCKET_COMPAT); export const PORT = process.env.WIREIO_PORT || process.env.PORT || 4000; +export const MAX_HTTP_BUFFER_SIZE = process.env.WIREIO_MAX_HTTP_BUFFER_SIZE || 1e6 /*1MB*/; if (SOCKET_COMPAT) { console.log(`Socket.io 2.X compatibility is enabled`); } startServer({ - socketIOConfig: { path: SOCKET_PATH, allowEIO3: SOCKET_COMPAT }, + socketIOConfig: { path: SOCKET_PATH, allowEIO3: SOCKET_COMPAT, maxHttpBufferSize: MAX_HTTP_BUFFER_SIZE }, port: PORT, });