Skip to content

Commit

Permalink
feat: allow relative redirects (#3140)
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Nov 7, 2021
1 parent 0d7d8da commit 6502b63
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/lib/default-callbacks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const defaultCallbacks: CallbacksOptions = {
},
redirect({ url, baseUrl }) {
if (url.startsWith(baseUrl)) return url
else if (url.startsWith("/")) return new URL(url, baseUrl).toString()
return baseUrl
},
session({ session }) {
Expand Down

0 comments on commit 6502b63

Please sign in to comment.