Ignore next static routes
This commit is contained in:
@@ -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}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user