Signierte Sitzungs-Cookies mit jose, OIDC ueber openid-client (authentik), Schutz in proxy.ts, Anmeldeseite, Audit-Log-Ansicht, Sicherheits-Kopfzeilen und Rate-Limit. Kein Auth.js, weil Version 5 Beta ist. 147 Tests. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
24 lines
884 B
TypeScript
24 lines
884 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 = {
|
|
// 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;
|