Files
Goldebek/next.config.ts
T
Per Hoener 3f38d4bbb5
Deploy / rollback-dev (push) Skipped
Deploy / rollback-master (push) Skipped
Deploy / changes (push) Successful in 4s
Deploy / app-quality (push) Failing after 33s
Deploy / secret-scan (push) Successful in 5s
Deploy / security-deps (push) Successful in 5s
Deploy / context (push) Successful in 1s
Deploy / app-image (push) Skipped
Deploy / deploy-dev (push) Skipped
Deploy / deploy-master (push) Skipped
Deploy / validate-dispatch (push) Successful in 0s
Deploy / scheduled-rebuild-dev (push) Skipped
Deploy / scheduled-rebuild-master (push) Skipped
Website-Inhalte und Ringreiterseite ueberarbeiten
2026-09-20 19:36:39 +02:00

68 lines
2.7 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(),
},
images: {
formats: ["image/avif", "image/webp"],
},
async redirects() {
return [
{ source: "/die-gemeinde/ueber-uns", destination: "/gemeinde/ueber-goldebek", permanent: true },
{ source: "/die-gemeinde/doerpshuus", destination: "/leben/doerpshuus", permanent: true },
{ source: "/die-gemeinde/dorfchronik", destination: "/gemeinde/dorfchronik", permanent: true },
{ source: "/die-gemeinde/kulturausschuss", destination: "/leben/kulturausschuss", permanent: true },
{ source: "/gemeindevertretung", destination: "/politik/gemeindevertretung", permanent: true },
{ source: "/vereine", destination: "/leben/vereine", permanent: true },
{ source: "/ueber-uns", destination: "/gemeinde/ueber-goldebek", permanent: true },
{ source: "/informationen", destination: "/service", permanent: true },
{ source: "/service/ansprechpartner", destination: "/kontakt", permanent: true },
{ source: "/service/wichtige-links", destination: "/service", permanent: true },
{ source: "/kalender", destination: "/termine", permanent: true },
{ source: "/fahrten/:path*", destination: "/aktuelles", permanent: true },
{ source: "/bilder", destination: "/gemeinde/ueber-goldebek", permanent: true },
];
},
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" },
{ key: "X-Frame-Options", value: "SAMEORIGIN" },
],
},
{
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;