From 008af4e86bfea1c792420aaf68251630842bb0f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?BRAMILLE=20S=C3=A9bastien?= <2752200+oktapodia@users.noreply.github.com> Date: Mon, 2 Dec 2024 10:25:06 +0000 Subject: [PATCH] fix: middleware regex (#1545) --- src/middleware.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/middleware.ts b/src/middleware.ts index c13311719..69ac2d265 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -20,5 +20,6 @@ export function middleware(request: NextRequest) { // Applies this middleware only to specific paths export const config = { - matcher: '/((?!api|static|.*\\..*|_next).*)', + matcher: + '/((?!api|static|_next|favicon\\.ico|.*\\.(?:png|jp?eg|gif|webp|svg|ico|riv)).*)', };