diff --git a/app/server/app.ts b/app/server/app.ts index 5df7f999..3cdfa803 100644 --- a/app/server/app.ts +++ b/app/server/app.ts @@ -1,5 +1,6 @@ import { Scalar } from "@scalar/hono-api-reference"; import { Hono } from "hono"; +import { bodyLimit } from "hono/body-limit"; import { cors } from "hono/cors"; import { logger as honoLogger } from "hono/logger"; import { secureHeaders } from "hono/secure-headers"; @@ -64,6 +65,13 @@ export const createApp = () => { ); } + app.use( + bodyLimit({ + maxSize: 10 * 1024 * 1024, // 10MB + onError: (c) => c.json({ message: "Request body too large" }, 413), + }), + ); + app .get("healthcheck", (c) => c.json({ status: "ok" })) .route("/api/v1/auth", authController)