chore: rewrite api.cal.com/v2 to api v2 (#14285)
* chore: rewrite api.cal.com/v2 to api v2 * fixup! chore: rewrite api.cal.com/v2 to api v2 * fixup! fixup! chore: rewrite api.cal.com/v2 to api v2 --------- Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
1 parent
ccc294e567
commit
f8cbf8b1c4
5 files changed
+23
-1
No files matched your search
@@ -4,3 +4,4 @@ NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
|
||||
|
||||
# Get it in console.cal.com
|
||||
CALCOM_LICENSE_KEY=""
|
||||
NEXT_PUBLIC_API_V2_ROOT_URL=http://localhost:5555
|
||||
@@ -47,6 +47,22 @@ const nextConfig = {
|
||||
source: "/v:version/:rest*",
|
||||
destination: "/api/v:version/:rest*",
|
||||
},
|
||||
{
|
||||
source: "/api/v2",
|
||||
destination: `${process.env.NEXT_PUBLIC_API_V2_ROOT_URL}/health`,
|
||||
},
|
||||
{
|
||||
source: "/api/v2/health",
|
||||
destination: `${process.env.NEXT_PUBLIC_API_V2_ROOT_URL}/health`,
|
||||
},
|
||||
{
|
||||
source: "/api/v2/docs/:path*",
|
||||
destination: `${process.env.NEXT_PUBLIC_API_V2_ROOT_URL}/docs/:path*`,
|
||||
},
|
||||
{
|
||||
source: "/api/v2/:path*",
|
||||
destination: `${process.env.NEXT_PUBLIC_API_V2_ROOT_URL}/api/v2/:path*`,
|
||||
},
|
||||
// This redirects requests to api/v*/ to /api/ passing version as a query parameter.
|
||||
{
|
||||
source: "/api/v:version/:rest*",
|
||||
|
||||
Reference in new issue
Block a user