feat(auth): Anmeldung mit Passwort und OIDC, Schutz aller Seiten (#013)
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>
This commit is contained in:
@@ -1,11 +1,23 @@
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user