mirror of
https://github.com/bitbaum/causius.git
synced 2026-12-04 07:50:25 +01:00
- Anonymisation: names, addresses, AHV, IBAN, phone, e-mail, birth dates and labelled reference numbers are replaced with placeholders before a letter leaves the browser; the reader sees and can adjust every replacement and preview what is sent. The browser restores the values in the result. - Photo cover tool: black out areas of a page; boxes are burnt into the pixels before upload. - Anonymised export for helpers; pseudonymity for clients, assistants and lawyers in the helper rules (lawyer named to a client on engagement). - Security: per-request nonce CSP (strict-dynamic, connect-src 'self', frame-ancestors 'none'), HSTS, nosniff, no-referrer, Permissions-Policy, COOP/CORP, no-store on the API, no X-Powered-By. - Fix: unprefixed English pages were rewritten by next-intl to https://localhost behind the box's proxy and answered 500. Every language is now prefixed; / redirects by browser language. - AGENTS.md: finish to production; security and privacy stay strict. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012EJFFkKhmaVnnH8E3mHnaZ
24 lines
848 B
TypeScript
24 lines
848 B
TypeScript
import type { NextConfig } from "next";
|
|
import createNextIntlPlugin from "next-intl/plugin";
|
|
import { SECURITY_HEADERS } from "./lib/security";
|
|
|
|
// Points next-intl at the request config that picks each request's language.
|
|
const withNextIntl = createNextIntlPlugin("./i18n/request.ts");
|
|
|
|
const nextConfig: NextConfig = {
|
|
// The box's launch.sh looks for a server.js — see sync-infra.sh.
|
|
output: "standalone",
|
|
reactStrictMode: true,
|
|
// Nothing to gain from telling the internet which framework this is.
|
|
poweredByHeader: false,
|
|
async headers() {
|
|
return [
|
|
{ source: "/:path*", headers: SECURITY_HEADERS },
|
|
// Answers about a reader's letter or key must never sit in a cache.
|
|
{ source: "/api/:path*", headers: [{ key: "Cache-Control", value: "no-store" }] },
|
|
];
|
|
},
|
|
};
|
|
|
|
export default withNextIntl(nextConfig);
|