From f2e0c205ca238501c1eeddf564f9c44f8c0f9cc1 Mon Sep 17 00:00:00 2001 From: emilielr <43408175+emilielr@users.noreply.github.com> Date: Wed, 16 Oct 2024 09:36:43 +0200 Subject: [PATCH] fix(middleware): disable logging for prefetch pages (#1682) --- tavla/middleware.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tavla/middleware.ts b/tavla/middleware.ts index 0f39629f0..c05cc0cd6 100644 --- a/tavla/middleware.ts +++ b/tavla/middleware.ts @@ -22,5 +22,10 @@ export function middleware(request: NextRequest) { } export const config = { - matcher: ['/:id(\\w{20})'], + matcher: [ + { + source: '/:id(\\w{20})', + missing: [{ type: 'header', key: 'next-router-prefetch' }], + }, + ], }