Files
files/nextjs/next.config.mjs
2026-03-27 19:50:53 +01:00

26 lines
611 B
JavaScript

/** @type {import('next').NextConfig} */
const uploadMaxBytes = Number.parseInt(process.env.UPLOAD_MAX_BYTES || '0', 10);
const actionBodySizeLimit = Number.isFinite(uploadMaxBytes) && uploadMaxBytes > 0
? `${uploadMaxBytes}`
: '1gb';
const nextConfig = {
poweredByHeader: false,
experimental: {
serverActions: {
bodySizeLimit: actionBodySizeLimit,
},
},
serverExternalPackages: ['sqlite3'],
async headers() {
return [
{
source: '/:path*',
headers: [{ key: 'X-Content-Type-Options', value: 'nosniff' }],
},
];
},
};
export default nextConfig;