Skip to content

middleware | custom redirect #4882

Answered by ThangHuuVu
KoesterJannik asked this question in Help
Discussion options

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

Comment options

You must be logged in to vote
3 replies
@KoesterJannik
Comment options

@sangosteve
Comment options

@claritise
Comment options

Answer selected by ThangHuuVu
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@TheCodeRevolution
Comment options

@Nirajn2311
Comment options

@bhubavenski
Comment options

Comment options

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