mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-03-11 04:49:49 +01:00
Release/v0.2.31 (#188)
This commit is contained in:
13
middleware.ts
Normal file
13
middleware.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
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*'],
|
||||
}
|
||||
Reference in New Issue
Block a user