fix: increase body size limit to 500MB for audio uploads
All checks were successful
Build & Push Docker Image / build-and-push (push) Successful in 42s

Default SvelteKit node adapter body limit is 512KB — too small for
audio recordings (30s ~556KB, longer recordings much larger).
Set bodySize: 500MB in adapter config. Also set BODY_SIZE_LIMIT env
in production compose .env as belt-and-suspenders.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Giancarmine Salucci
2026-05-06 19:32:28 +02:00
parent ed5e88f5ca
commit ffd5d48c0d

View File

@@ -6,7 +6,7 @@ const config = {
runes: ({ filename }) => (filename.split(/[/\\]/).includes('node_modules') ? undefined : true) runes: ({ filename }) => (filename.split(/[/\\]/).includes('node_modules') ? undefined : true)
}, },
kit: { kit: {
adapter: adapter({ out: 'build' }), adapter: adapter({ out: 'build', bodySize: 500 * 1024 * 1024 }), // 500 MB for audio uploads
// CSRF origin check disabled: this app uses no cookie-based session auth, // CSRF origin check disabled: this app uses no cookie-based session auth,
// and the Web Share Target POST legitimately arrives from external origins. // and the Web Share Target POST legitimately arrives from external origins.
csrf: { checkOrigin: false } csrf: { checkOrigin: false }