Fixing an issue with redirect having the middleware applied before the redirection
This commit is contained in:
parent
b3655bbee1
commit
033bd521cf
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue