diff --git a/docs/server.md b/docs/server.md index f051bbed0..ac33b276d 100644 --- a/docs/server.md +++ b/docs/server.md @@ -58,6 +58,10 @@ Boot is sequential and fail-fast. If migrations fail, the process exits. If a pl --- +The HTTP server accepts request bodies up to 1 GiB, matching Site Import's +archive input limit. CMS archive imports stream media entries to disk; their +manifest has a separate 256 MiB limit. + ## Routing `server/router.ts` exposes one function: diff --git a/server/index.ts b/server/index.ts index 2fd59b92a..61a590b69 100644 --- a/server/index.ts +++ b/server/index.ts @@ -78,6 +78,9 @@ function corsHeaders(origin: string | null): Record { const server = Bun.serve({ port: config.port, hostname: config.host, + // Site Import accepts archives up to 1 GiB. Bun's default 128 MiB limit + // otherwise rejects media-heavy bundles before the streaming importer runs. + maxRequestBodySize: 1024 * 1024 * 1024, // Disable Bun's default 10-second idle timeout. The agent endpoint streams // NDJSON for as long as Claude's loop is running — Claude's "thinking"