Merge commit from fork

Fix middleware headers
This commit is contained in:
Enno Gelhaus 2025-07-11 16:51:28 +02:00 committed by GitHub
commit 65eca0e2f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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' ||