Fix middleware headers

This commit is contained in:
Dominik Prodinger 2025-07-10 22:35:58 +02:00
parent ef313b88e4
commit 5499e32df8
1 changed files with 9 additions and 3 deletions

View File

@ -41,7 +41,9 @@ export async function middleware(request: NextRequest) {
nextUrl.pathname.startsWith('/icons/')
) {
return NextResponse.next({
headers,
request: {
headers: headers,
},
});
}
// If the URL is logout, delete the cookie and redirect to login
@ -104,7 +106,9 @@ export async function middleware(request: NextRequest) {
return redirect;
}
return NextResponse.next({
headers,
request: {
headers: headers,
},
});
}
try {
@ -145,7 +149,9 @@ export async function middleware(request: NextRequest) {
);
}
const next = NextResponse.next({
headers,
request: {
headers: headers,
},
});
if (
nextUrl.pathname === '/marketplace/seller' ||