CI Pipeline with Test Management / 🧪 Run Tests & Generate Reports (push) Waiting to run
CI Pipeline with Test Management / 🐳 Docker Integration Tests (push) Blocked by required conditions
CI Pipeline with Test Management / 🏗️ Build Docker Image (push) Blocked by required conditions
CI Pipeline with Test Management / 📊 Generate Test Summary (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🧪 Run Tests & Generate Reports (push) Waiting to run
Test Reporting & Gherkin Analysis / 📊 Analyze Test Coverage (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🔄 Sync with Linear (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / ⚡ Performance Monitoring (push) Blocked by required conditions
- /api/contact enforces per-field length caps (name/email/subject/message) before sanitization/persistence; over-long message returns 400 without touching Mongo (test added) - logger: crypto-based request id (randomUUID) instead of Math.random().substr; defaultMeta.version prefers DEPLOY_VERSION over npm_package_version - next.config: move Turbopack svg rule from deprecated experimental.turbo to top-level turbopack - deps: bump next 15.5.2 → 15.5.23; npm audit fix (19 → 3, remaining are transitive sharp/libvips DoS advisories, not exploitable for static images) Closes MITHOME-78, MITHOME-79
75 lines
1.9 KiB
TypeScript
Executable File
75 lines
1.9 KiB
TypeScript
Executable File
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
// Enable standalone output for Docker deployment
|
|
output: 'standalone',
|
|
|
|
// Skip linting during build for faster Docker builds
|
|
eslint: {
|
|
ignoreDuringBuilds: true,
|
|
},
|
|
|
|
// Skip TypeScript checking during build (for faster Docker builds)
|
|
typescript: {
|
|
ignoreBuildErrors: true,
|
|
},
|
|
|
|
// Optimize for production builds — Turbopack rules moved from the deprecated
|
|
// experimental.turbo to the top-level turbopack key (Next 15.5).
|
|
turbopack: {
|
|
rules: {
|
|
'*.svg': {
|
|
loaders: ['@svgr/webpack'],
|
|
as: '*.js',
|
|
},
|
|
},
|
|
},
|
|
|
|
// Image optimization
|
|
images: {
|
|
formats: ['image/webp', 'image/avif'],
|
|
minimumCacheTTL: 60 * 60 * 24 * 30, // 30 days
|
|
},
|
|
|
|
// Security headers
|
|
async headers() {
|
|
return [
|
|
{
|
|
// Security headers apply to every route, including static assets.
|
|
source: '/:path*',
|
|
headers: [
|
|
{
|
|
key: 'X-Frame-Options',
|
|
value: 'DENY',
|
|
},
|
|
{
|
|
key: 'X-Content-Type-Options',
|
|
value: 'nosniff',
|
|
},
|
|
{
|
|
key: 'Referrer-Policy',
|
|
value: 'origin-when-cross-origin',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
// WHY: no-cache must not hit hashed build assets (_next/static) or
|
|
// optimized images (_next/image); they are content-addressed and rely on
|
|
// long-lived caching. Overriding them would re-download the bundle on
|
|
// every page load.
|
|
source: '/((?!_next/static|_next/image).*)',
|
|
headers: [
|
|
{
|
|
key: 'Cache-Control',
|
|
value: 'private, no-cache, must-revalidate, max-age=0',
|
|
},
|
|
{ key: 'Pragma', value: 'no-cache' },
|
|
{ key: 'Expires', value: '0' },
|
|
],
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|