fix(api): 🐛 ctx.basePath
maybe undefined and not suitable for redirect base url
This commit is contained in:
parent
79a6214f10
commit
3adc705e25
|
@ -92,7 +92,7 @@ export const handler: SessionHandlers = {
|
|||
ctx.state.session.set('user', user)
|
||||
|
||||
if (redirect) {
|
||||
return Response.redirect(new URL(redirect, ctx.basePath))
|
||||
return Response.redirect(new URL(redirect, ctx.url.origin))
|
||||
}
|
||||
|
||||
return respondApi('success', user)
|
||||
|
|
Loading…
Reference in a new issue