Mehrstufiges Abbild mit Standalone-Ausgabe, eigener Migrationsdienst, Worker als ESM-Buendel, LXC-Installer fuer Proxmox, Reverse-Proxy-Beispiele, Sicherungsskript und Zustandspruefung. Stapel gebaut und mit Agent-Durchlauf geprueft. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
26 lines
992 B
TypeScript
26 lines
992 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const SICHERHEITS_KOPFZEILEN = [
|
|
{ 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: "camera=(), microphone=(), geolocation=()" },
|
|
// HSTS wirkt nur über HTTPS; hinter einem Reverse Proxy ist das der Normalfall.
|
|
{ key: "Strict-Transport-Security", value: "max-age=31536000; includeSubDomains" },
|
|
];
|
|
|
|
const nextConfig: NextConfig = {
|
|
// Für das Container-Abbild: nur die tatsächlich benötigten Dateien mitnehmen.
|
|
output: "standalone",
|
|
// Die Agent-Skripte werden zur Laufzeit ausgeliefert und müssen daher mitgepackt werden.
|
|
outputFileTracingIncludes: {
|
|
"/install.sh": ["./agent/install.sh"],
|
|
"/agent.sh": ["./agent/proxledger-agent.sh"],
|
|
},
|
|
async headers() {
|
|
return [{ source: "/:pfad*", headers: SICHERHEITS_KOPFZEILEN }];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|