fix(server): raise express.json body limit to 10mb
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.
This commit is contained in:
1 parent
8396f478c5
commit
f4177baed5
1 file changed
+1
-1
+1
-1
@@ -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());
|
||||
|
||||
Reference in new issue
Block a user