Ignore next static routes

This commit is contained in:
2025-09-06 23:46:03 +02:00
parent 011f7994cc
commit 75001c1f9f

View File

@@ -1,6 +1,9 @@
import { NextRequest } from "next/server" import { NextRequest } from "next/server"
export async function middleware(req: NextRequest) { 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}`) console.log(`[Middleware] ${req.method} ${req.nextUrl.pathname}`)
} }