perf: Move runtime redirects to build-time redirects in next.config.js (#23325)
* routing forms * auth new * settings route * apps installed * next.config.js
This commit is contained in:
1 parent
4599740637
commit
2922c8fe77
6 files changed
+15
-44
No files matched your search
+15
-1
@@ -295,6 +295,10 @@ const nextConfig = (phase) => {
|
||||
source: "/routing/:path*",
|
||||
destination: "/apps/routing-forms/:path*",
|
||||
},
|
||||
{
|
||||
source: "/routing-forms",
|
||||
destination: "/apps/routing-forms/forms",
|
||||
},
|
||||
{
|
||||
source: "/success/:path*",
|
||||
has: [
|
||||
@@ -548,7 +552,7 @@ const nextConfig = (phase) => {
|
||||
},
|
||||
{
|
||||
source: "/apps/routing-forms",
|
||||
destination: "/routing/forms",
|
||||
destination: "/apps/routing-forms/forms",
|
||||
permanent: false,
|
||||
},
|
||||
{
|
||||
@@ -556,6 +560,11 @@ const nextConfig = (phase) => {
|
||||
destination: "/app-store/:path*",
|
||||
permanent: true,
|
||||
},
|
||||
{
|
||||
source: "/auth/new",
|
||||
destination: process.env.NEXT_PUBLIC_WEBAPP_URL || "https://app.cal.com",
|
||||
permanent: true,
|
||||
},
|
||||
{
|
||||
source: "/auth/signup",
|
||||
destination: "/signup",
|
||||
@@ -653,6 +662,11 @@ const nextConfig = (phase) => {
|
||||
destination: "/settings/platform",
|
||||
permanent: true,
|
||||
},
|
||||
{
|
||||
source: "/settings/admin/apps",
|
||||
destination: "/settings/admin/apps/calendar",
|
||||
permanent: true,
|
||||
},
|
||||
// OAuth callbacks when sent to localhost:3000(w would be expected) should be redirected to corresponding to WEBAPP_URL
|
||||
...(process.env.NODE_ENV === "development" &&
|
||||
// Safer to enable the redirect only when the user is opting to test out organizations
|
||||
|
||||
Reference in new issue
Block a user