From ffc46daa247a7baa7f1ad2c0c08adaa6feb2565e Mon Sep 17 00:00:00 2001 From: Vigneshraj Sekar Babu Date: Wed, 10 Jun 2026 10:19:57 -0700 Subject: [PATCH] fix: allow larger site upload request bodies --- next.config.js | 5 +++++ next.config.test.js | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 next.config.test.js diff --git a/next.config.js b/next.config.js index e3aeb9e..d637962 100644 --- a/next.config.js +++ b/next.config.js @@ -16,7 +16,12 @@ require('dotenv').config(); +const SITES_UPLOAD_BODY_LIMIT_BYTES = 200 * 1000 * 1000; + module.exports = { + experimental: { + middlewareClientMaxBodySize: SITES_UPLOAD_BODY_LIMIT_BYTES, + }, serverExternalPackages: [ '@kubernetes/client-node', '@octokit/core', diff --git a/next.config.test.js b/next.config.test.js new file mode 100644 index 0000000..f075951 --- /dev/null +++ b/next.config.test.js @@ -0,0 +1,8 @@ +const nextConfig = require('./next.config'); + +describe('next config', () => { + it('allows multipart uploads larger than the default request body clone limit', () => { + expect(nextConfig.experimental?.middlewareClientMaxBodySize).toBe(200 * 1000 * 1000); + expect(nextConfig.experimental?.middlewareClientMaxBodySize).toBeGreaterThan(10 * 1024 * 1024); + }); +});