mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-03-09 20:09:50 +01:00
14 lines
361 B
TypeScript
14 lines
361 B
TypeScript
import { NextResponse, type NextRequest } from 'next/server'
|
|
|
|
export function middleware(request: NextRequest) {
|
|
if (process.env.NODE_ENV !== 'development' && request.nextUrl.pathname.startsWith('/debug')) {
|
|
return new NextResponse('Not Found', { status: 404 })
|
|
}
|
|
|
|
return NextResponse.next()
|
|
}
|
|
|
|
export const config = {
|
|
matcher: ['/debug/:path*'],
|
|
}
|