From 75001c1f9f4f3fccc93984150cafbb93586cc84b Mon Sep 17 00:00:00 2001 From: Taken Date: Sat, 6 Sep 2025 23:46:03 +0200 Subject: [PATCH] Ignore next static routes --- src/middleware.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/middleware.ts b/src/middleware.ts index 6651223..0e23a7f 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -1,6 +1,9 @@ import { NextRequest } from "next/server" export async function middleware(req: NextRequest) { + if (req.nextUrl.pathname.startsWith("/_next/")) return + if (req.nextUrl.pathname.startsWith("/favicon.ico")) return + console.log(`[Middleware] ${req.method} ${req.nextUrl.pathname}`) }