This commit is contained in:
2025-08-17 19:38:04 -03:00
parent b1cff154d4
commit 99c9700c52
2 changed files with 12 additions and 17 deletions

View File

@@ -7,25 +7,20 @@ export async function loader({ request, context }: Route.LoaderArgs) {
const issuerUrl = new URL('/authorize', context.cloudflare.env.ISSUER_URL)
issuerUrl.search = url.search
console.log(request.headers.get('Cookie'))
console.log(issuerUrl.toString())
try {
const r = await fetch(issuerUrl.toString(), {
method: 'GET',
headers: {
'Content-Type': 'application/json',
Cookie: request.headers.get('Cookie')
}
},
redirect: 'manual'
})
console.log(r)
// return new Response(await r.text(), {
// status: r.status,
// headers: r.headers
// })
return new Response(await r.text(), {
status: r.status,
headers: r.headers
})
} catch {
return new Response(null, { status: 500 })
}