diff --git a/ui/middleware.ts b/ui/middleware.ts index 3a962c645e..ca4f345488 100644 --- a/ui/middleware.ts +++ b/ui/middleware.ts @@ -2,20 +2,12 @@ import type {NextRequest} from 'next/server'; import {NextResponse} from 'next/server' -export default function middleware(request: NextRequest) { - console.log(request); +export default function middleware(req: NextRequest) { if (req.nextUrl.pathname !== '/' && !req.nextUrl.pathname.startsWith("/_next/static/") && process.env.PEERDB_PASSWORD && req.cookies.get('password')?.value !== process.env.PEERDB_PASSWORD) { - console.log('REJECT'); return new Response('{}', {status : 401}); } return NextResponse.next() } - -/* -export function middleware(req: NextRequest) { - console.log(req); - console.log(req.nextUrl); -}*/