diff --git a/src/middleware.ts b/src/middleware.ts index ff90220a..bd70a4df 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -7,20 +7,14 @@ import { i18nDetectMiddleware } from './middlewares/i18nDetectMiddleware'; export const middlewares = [authMiddleware, i18nDetectMiddleware]; export const config = { - matcher: [ - '/api/:path*', - '/(default|cs-cz|de-de|en|es-es|et-ee|fr-fr|it-it|ja-jp|pl-pl|ro|ru-ru|sv-se)/:path*', - '/((?!_next).*)/', - ], + matcher: ['/api/:path*', '/(default|cs-cz|de-de|en|es-es|et-ee|fr-fr|it-it|ja-jp|pl-pl|ro|ru-ru|sv-se)/:path*'], }; -const blocklist = [ - '_next' -] +const blocklist = ['_next']; export default async function middleware(request: NextRequest) { if (blocklist.some((pattern) => request?.nextUrl?.pathname?.includes(pattern))) { - return NextResponse.next() + return NextResponse.next(); } // if a response is returned, return it otherwise call `next()` for (const fn of middlewares) {