Skip to content

Commit 6502b63

Browse files
feat: allow relative redirects (#3140)
1 parent 0d7d8da commit 6502b63

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/core/lib/default-callbacks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export const defaultCallbacks: CallbacksOptions = {
66
},
77
redirect({ url, baseUrl }) {
88
if (url.startsWith(baseUrl)) return url
9+
else if (url.startsWith("/")) return new URL(url, baseUrl).toString()
910
return baseUrl
1011
},
1112
session({ session }) {

0 commit comments

Comments
 (0)