16 lines
412 B
TypeScript
16 lines
412 B
TypeScript
import { NextResponse } from "next/server"
|
|
|
|
import { handleAuth } from "@/constants/routes/handleAuth"
|
|
|
|
import type { NextMiddleware } from "next/server"
|
|
|
|
import type { MiddlewareMatcher } from "@/types/middleware"
|
|
|
|
export const middleware: NextMiddleware = () => {
|
|
return NextResponse.next()
|
|
}
|
|
|
|
export const matcher: MiddlewareMatcher = (request) => {
|
|
return handleAuth.includes(request.nextUrl.pathname)
|
|
}
|