From 3b637eefaaa46d9339f4708cfbde9d469d5cd8b2 Mon Sep 17 00:00:00 2001 From: Agusti Fernandez Date: Fri, 15 Apr 2022 22:19:52 +0200 Subject: [PATCH] adds redirect for /api to developer.cal.com (#2517) Co-authored-by: Agusti Fernandez Pardo --- apps/docs/next.config.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/docs/next.config.js b/apps/docs/next.config.js index 19c88a12..e47ae62d 100644 --- a/apps/docs/next.config.js +++ b/apps/docs/next.config.js @@ -3,4 +3,14 @@ const withNextra = require("nextra")({ themeConfig: "./theme.config.js", unstable_staticImage: true, }); -module.exports = withNextra(); +module.exports = withNextra({ + async rewrites() { + return [ + // This redirects requests recieved at / the root to the /api/ folder. + { + source: "/api", + destination: "https://developer.cal.com/", + }, + ]; + }, +});