feat: Security CSRF Fix, Logout optimierung, Footer Anpassung, Rechtstexteanpassung
Docker Image bauen und veroeffentlichen / build-and-push (push) Failing after 1m33s

This commit is contained in:
Nick Szaunig committed 2026-09-03 13:51:50 +02:00
1 parent 0753a3bc8a
commit 4d3100e9ba
28 files changed
+802 -121

No files matched your search

+6
View File
@@ -7,9 +7,15 @@ import { sendMail } from "@/lib/mail";
import { newsletterConfirmEmail } from "@/lib/email-templates";
import { getBaseUrl } from "@/lib/url";
import { verifyTurnstileToken } from "@/lib/turnstile";
import { isTrustedOrigin } from "@/lib/csrf";
import { getLocale } from "@/i18n/locale";
export async function POST(request: Request) {
// Route-Handler haben keinen eingebauten CSRF-Schutz — siehe lib/csrf.ts.
if (!isTrustedOrigin(request)) {
return NextResponse.json({ error: "Ungültige Anfrage." }, { status: 403 });
}
const ip = await getClientIp();
if (!rateLimit(`newsletter:${ip}`, 5, 60 * 60 * 1000)) {
return NextResponse.json(