fix: cleanup logs

This commit is contained in:
Matilda Landström
2024-05-22 11:11:19 +02:00
parent e65145687d
commit e3e4d6c1c8
4 changed files with 8 additions and 15 deletions

View File

@@ -17,7 +17,7 @@ export async function GET(
let redirectTo: string
const returnUrl = request.headers.get("x-returnurl")
console.log("TESTING", returnUrl)
if (returnUrl) {
redirectTo = returnUrl
} else {
@@ -67,6 +67,7 @@ export async function GET(
const redirectUrl = new URL(redirectUrlValue)
redirectUrl.searchParams.set("returnurl", redirectTo)
redirectTo = redirectUrl.toString()
console.log("TOTO", redirectTo)
} catch (e) {
console.error(
"Unable to create URL for seamless logout, proceeding without it."

View File

@@ -15,7 +15,7 @@ export async function GET(
let redirectTo: string
const returnUrl = request.headers.get("x-returnurl")
console.log("TESTTEST", returnUrl, request)
if (returnUrl) {
// Seamless login request from Current web
redirectTo = returnUrl
@@ -33,6 +33,7 @@ export async function GET(
}
redirectTo = new URL(redirectTo, env.PUBLIC_URL).href
}
// Clean up cookie from authRequired middleware
redirectHeaders = new Headers()
redirectHeaders.append(