🚑 Fix URL malformed (#743)

This commit is contained in:
Manuel
2023-03-03 20:27:30 +01:00
committed by GitHub
parent 457e9cf2bd
commit c8ef6bae1a
3 changed files with 69 additions and 66 deletions

View File

@@ -1,8 +1,8 @@
import { NextFetchEvent, NextRequest, NextResponse } from 'next/server';
import { NextRequest, NextResponse } from 'next/server';
// eslint-disable-next-line consistent-return
export function middleware(req: NextRequest, ev: NextFetchEvent) {
export function middleware(req: NextRequest) {
const { cookies } = req;
// Don't even bother with the middleware if there is no defined password
if (!process.env.PASSWORD) return NextResponse.next();