From e93178775253bd3990e54ecb29818ed3d928d743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=B6rdle=20Bot?= Date: Fri, 21 Nov 2025 22:06:24 +0100 Subject: [PATCH] fix: add range request support and proper headers for large MP3 playback --- next.config.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/next.config.ts b/next.config.ts index 48ad8c4..a0043f5 100644 --- a/next.config.ts +++ b/next.config.ts @@ -4,6 +4,32 @@ const nextConfig: NextConfig = { /* config options here */ reactCompiler: true, output: 'standalone', + experimental: { + serverActions: { + bodySizeLimit: '50mb', + }, + }, + async headers() { + return [ + { + source: '/uploads/:path*.mp3', + headers: [ + { + key: 'Content-Type', + value: 'audio/mpeg', + }, + { + key: 'Accept-Ranges', + value: 'bytes', + }, + { + key: 'Cache-Control', + value: 'public, max-age=31536000, immutable', + }, + ], + }, + ]; + }, }; export default nextConfig;