Files
labnethub/next.config.mjs
T
prog1764 207ec7e56b docker: подготовка к запуску в контейнере (Next.js)
- Dockerfile: multi-stage (deps/build/runner), standalone-сборка, non-root user
- next.config.mjs: output: 'standalone'
- docker-compose.yml: порт 3000, env из .env.local
- .dockerignore: node_modules, .next, .env*, кэш
- проверено: npm run build прошёл, standalone артефакт на месте
2026-08-04 20:23:16 +04:00

32 lines
764 B
JavaScript

/** @type {import('next').NextConfig} */
const securityHeaders = [
{ key: "X-DNS-Prefetch-Control", value: "on" },
{
key: "Strict-Transport-Security",
value: "max-age=63072000; includeSubDomains; preload",
},
{ key: "X-Frame-Options", value: "DENY" },
{ key: "X-Content-Type-Options", value: "nosniff" },
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
{
key: "Permissions-Policy",
value: "camera=(), microphone=(), geolocation=(), interest-cohort=()",
},
];
const nextConfig = {
reactStrictMode: true,
poweredByHeader: false,
output: "standalone",
async headers() {
return [
{
source: "/:path*",
headers: securityHeaders,
},
];
},
};
export default nextConfig;