Files
novalon-website/next.config.mjs
T
zhangxiang 628a0f1a2b fix: align startup copy with 2026 founding and deploy hybrid rendering
- Replace fabricated 12-year/500+/8+ team experience claims with
  2026 founding, first-client co-creation, professional team wording
- Remove fake case studies and unverified certifications from seeds,
  cases page, products and ERP upgrade page
- Enable Next.js standalone output and production hybrid deployment
  (Dockerfile.prod, docker-compose.server.yml, Nginx nextjs upstream)
- Add linux-musl Prisma engine target and production crypto key build
- Sync production CMS database with cleaned seed content
2026-08-17 20:21:39 +08:00

45 lines
1.6 KiB
JavaScript

const cdnDomain = process.env.CDN_DOMAIN || '';
const nextConfig = {
output: 'standalone',
distDir: 'dist',
assetPrefix: cdnDomain || undefined,
images: {
unoptimized: true,
formats: ['image/avif', 'image/webp'],
},
compress: true,
poweredByHeader: false,
reactStrictMode: true,
experimental: {
optimizePackageImports: ['lucide-react', 'framer-motion'],
},
compiler: {
removeConsole: process.env.NODE_ENV === 'production',
},
generateEtags: true,
httpAgentOptions: {
keepAlive: true,
},
async headers() {
return [
{
source: '/(.*)',
headers: [
{ key: 'X-Content-Type-Options', value: 'nosniff' },
{ key: 'X-Frame-Options', value: 'DENY' },
{ key: 'X-XSS-Protection', value: '1; mode=block' },
{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' },
{
key: 'Content-Security-Policy',
value: "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.googletagmanager.com https://ssl.google-analytics.com; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: https://www.google-analytics.com https://ssl.google-analytics.com; font-src 'self'; connect-src 'self' https://www.google-analytics.com https://ssl.google-analytics.com; frame-src 'self'; object-src 'none'; base-uri 'self'; form-action 'self';",
},
{ key: 'Permissions-Policy', value: 'camera=(), microphone=(), geolocation=(), interest-cohort=()' },
],
},
];
},
};
export default nextConfig;