fix: add range request support and proper headers for large MP3 playback

This commit is contained in:
Hördle Bot
2025-11-21 22:06:24 +01:00
parent 3f47fac276
commit e931787752

View File

@@ -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;