From aa35e864d2f6c612c9de13acb54a6d53fd46acda Mon Sep 17 00:00:00 2001 From: Pablo Pettinari Date: Wed, 22 May 2024 17:26:57 +0200 Subject: [PATCH] fix: add explicit matcher for the root path to work on dev mode --- src/middleware.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/middleware.ts b/src/middleware.ts index 8811c3ce751..a246d48e94e 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -23,13 +23,11 @@ function detectLocale(acceptLanguage: string | null) { export const config = { matcher: [ + "/", // explicit matcher for root route /* * Match all request paths except for the ones starting with: * - api (API routes) * - _next/static (static files) - * - _next/image (image optimization files) - * - favicon.ico (favicon file) - * - .well-known (security files) */ "/((?!api|_next/static).*)", ],