Files
Per Hoener 0d45331f5c
Deploy / validate-dispatch (push) Successful in 43s
Deploy / scheduled-rebuild-dev (push) Skipped
Deploy / scheduled-rebuild-master (push) Skipped
Deploy / rollback-dev (push) Skipped
Deploy / rollback-master (push) Skipped
Deploy / changes (push) Successful in 13s
Deploy / secret-scan (push) Successful in 9s
Deploy / app-quality (push) Successful in 11m21s
Deploy / security-deps (push) Successful in 14s
Deploy / context (push) Failing after 1s
Deploy / app-image (push) Skipped
Deploy / deploy-dev (push) Skipped
Deploy / deploy-master (push) Skipped
Initial commit
2026-09-18 23:37:19 +02:00

47 lines
1.4 KiB
TypeScript

import type { NextConfig } from "next";
const securityHeaders = [
{ key: "Strict-Transport-Security", value: "max-age=31536000; includeSubDomains; preload" },
{ key: "X-Content-Type-Options", value: "nosniff" },
{ key: "X-Frame-Options", value: "DENY" },
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
{ key: "Permissions-Policy", value: "geolocation=()" },
{ key: "Cross-Origin-Opener-Policy", value: "same-origin" },
{ key: "Cross-Origin-Resource-Policy", value: "same-site" },
];
const nextConfig: NextConfig = {
output: "standalone",
poweredByHeader: false,
experimental: {
// TypeScript 5 provides the compiler API and avoids CLI output-capture issues
// in restricted build environments.
useTypeScriptCli: false,
},
turbopack: {
root: process.cwd(),
},
async headers() {
return [
{ source: "/(.*)", headers: securityHeaders },
{
source: "/downloads/:path*",
headers: [
{ key: "Cache-Control", value: "public, max-age=604800" },
{ key: "X-Robots-Tag", value: "noindex, noarchive" },
],
},
{
source: "/images/:path*",
headers: [{ key: "Cache-Control", value: "public, max-age=2592000" }],
},
{
source: "/fonts/:path*",
headers: [{ key: "Cache-Control", value: "public, max-age=2592000" }],
},
];
},
};
export default nextConfig;