diff --git a/packages/server/src/api/index.js b/packages/server/src/api/index.js index fc86058d08..6b81fb229b 100644 --- a/packages/server/src/api/index.js +++ b/packages/server/src/api/index.js @@ -53,6 +53,8 @@ router }) .use("/health", ctx => (ctx.status = 200)) .use("/version", ctx => (ctx.body = pkg.version)) + // re-direct before any middlewares occur + .redirect("/", "/builder") .use( buildAuthMiddleware(null, { publicAllowed: true, @@ -93,7 +95,4 @@ for (let route of mainRoutes) { router.use(staticRoutes.routes()) router.use(staticRoutes.allowedMethods()) -// add a redirect for when hitting server directly -router.redirect("/", "/builder") - module.exports = router