expressjs -> nextjs
This commit is contained in:
25
nextjs/next.config.mjs
Normal file
25
nextjs/next.config.mjs
Normal file
@@ -0,0 +1,25 @@
|
||||
/** @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;
|
||||
Reference in New Issue
Block a user