From 7d1e6b9451185bc2d71d4dbe119b562966500fd0 Mon Sep 17 00:00:00 2001 From: Patrick Date: Sat, 2 Aug 2025 16:12:53 +0200 Subject: [PATCH] revert 2fb4f8ac98cb30eadcadb11e50dc4468fe0ee5c5 revert added log statement to csrf validation --- src/lib/server/csrf.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/lib/server/csrf.ts b/src/lib/server/csrf.ts index d9eeef4..b52f21e 100644 --- a/src/lib/server/csrf.ts +++ b/src/lib/server/csrf.ts @@ -5,8 +5,6 @@ import type { Handle } from '@sveltejs/kit'; import { json, text } from '@sveltejs/kit'; -import Logs from "$lib/server/log" - /** * CSRF protection middleware for SvelteKit. * @@ -30,8 +28,6 @@ export function csrf(allowedPaths: string[], allowedOrigins: string[] = []): Han !allowedPaths.includes(url.pathname); // Path is not explicitly allowed if (forbidden) { - Logs.route.warn("Blocked request due to csrf violation") - const message = `Cross-site ${request.method} form submissions are forbidden`; if (request.headers.get('accept') === 'application/json') { return json({ message }, { status: 403 });