We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
${ROOT_DOMAIN}/login
app.${ROOT_DOMAIN}/login
I have been trying to redirect the login page of the app for a while this is how I got it done.
platforms/middleware.ts
Lines 62 to 69 in 7e33556
if ( hostname === "localhost:3000" || hostname === process.env.NEXT_PUBLIC_ROOT_DOMAIN ) { const https = hostname === 'localhost:3000' ? 'http' : 'https'; if (path === "/login") { return NextResponse.redirect(new URL(`${https}://app.${process.env.NEXT_PUBLIC_ROOT_DOMAIN}/login`, req.url)); } else if (path === "/settings") { return NextResponse.redirect(new URL(`${https}://app.${process.env.NEXT_PUBLIC_ROOT_DOMAIN}/settings`, req.url)); } return NextResponse.rewrite( new URL(`/home${path === "/" ? "" : path}`, req.url), ); }
am I doing this correctly or is there a better way?
The text was updated successfully, but these errors were encountered:
I wrote up a response recently in another issue with the same issue: #329 (comment). This was the best way I found
Sorry, something went wrong.
No branches or pull requests
I have been trying to redirect the login page of the app for a while this is how I got it done.
platforms/middleware.ts
Lines 62 to 69 in 7e33556
am I doing this correctly or is there a better way?
The text was updated successfully, but these errors were encountered: