absolute url for login prompt

This commit is contained in:
Max Peintner
2024-12-09 09:58:14 +01:00
parent 2e2ae590f9
commit c645bcfcfa

View File

@@ -279,7 +279,8 @@ export async function GET(request: NextRequest) {
});
if (res?.redirect) {
return NextResponse.redirect(res.redirect);
const absoluteUrl = new URL(res.redirect, request.url);
return NextResponse.redirect(absoluteUrl.toString());
}
} catch (error) {
console.error("Failed to execute sendLoginname:", error);