From f4177baed527ddfbee0611edceefcfc18ce30a9f Mon Sep 17 00:00:00 2001 From: gorkem-bwl Date: Fri, 10 Jul 2026 00:06:31 +0300 Subject: [PATCH] fix(server): raise express.json body limit to 10mb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Express defaults to a 100kb JSON body, which is too small for realistic imports through POST /api/v1/monitors/import/json (backups with many monitors and their config easily exceed 100kb, returning "request entity too large"). Raise the parser cap to 10mb. That covers real-world import payloads while keeping the DoS surface bounded — a larger, streaming file-upload route for imports remains desirable as a follow-up. --- server/src/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/app.ts b/server/src/app.ts index 2ed1c2f01..bf8c140c1 100644 --- a/server/src/app.ts +++ b/server/src/app.ts @@ -54,7 +54,7 @@ export const createApp = ({ app.use(express.static(frontendPath)); - app.use(express.json()); + app.use(express.json({ limit: "10mb" })); app.use(cookieParser()); app.use(sanitizeBody());