Skip to content

middleware | custom redirect #4882

Answered by ThangHuuVu
KoesterJannik asked this question in Help

You must be logged in to vote

Unfortunately, this isn't possible atm. In middleware, we only allow redirecting to the sign-in page. See:

const signInUrl = new URL(signInPage, req.nextUrl.origin)

Replies: 4 comments 6 replies

You must be logged in to vote
3 replies
@KoesterJannik

@sangosteve

@claritise

Answer selected by ThangHuuVu

You must be logged in to vote
0 replies

You must be logged in to vote
3 replies
@TheCodeRevolution

@Nirajn2311

@bhubavenski

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
9 participants