Files
sshkeyvault/next.config.ts
T
florian.wildeandClaude Opus 5.5 cef9510f18 chore: Projektgeruest mit Next.js 16, Prisma 7 und pnpm (#001)
Konfiguration aus Laufzettel uebernommen, damit alle Projekte gleich
gebaut und geprueft werden. Entwicklungsdatenbank auf 5436, weil 5433
und 5434 von ProxLedger und Laufzettel belegt sind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 09:05:15 +02:00

30 lines
1.1 KiB
TypeScript

import type { NextConfig } from "next";
/**
* Sicherheitskopfzeilen fuer alle Antworten. Die CSP selbst wird pro Anfrage in
* src/proxy.ts mit einer Nonce gesetzt, weil sie dort dynamisch sein muss.
*/
const SICHERHEITS_KOPFZEILEN = [
{ key: "X-Content-Type-Options", value: "nosniff" },
{ key: "X-Frame-Options", value: "DENY" },
// sshkv laeuft im internen Netz; Pfade wie /schluessel/<id> sollen trotzdem nie
// als Referrer an fremde Seiten gehen.
{ key: "Referrer-Policy", value: "no-referrer" },
{ key: "Permissions-Policy", value: "geolocation=(), microphone=(), camera=()" },
{ key: "Strict-Transport-Security", value: "max-age=63072000; includeSubDomains" },
{ key: "Cross-Origin-Opener-Policy", value: "same-origin" },
];
const konfiguration: NextConfig = {
// Fuer das schlanke Laufzeit-Abbild im Dockerfile.
output: "standalone",
poweredByHeader: false,
// ssh2 bringt optionale native Teile mit, die nicht gebuendelt werden duerfen.
serverExternalPackages: ["ssh2", "@node-rs/argon2", "pg-boss"],
async headers() {
return [{ source: "/:pfad*", headers: SICHERHEITS_KOPFZEILEN }];
},
};
export default konfiguration;