Skip to content

Commit

Permalink
fix(server): middlewareorder
Browse files Browse the repository at this point in the history
  • Loading branch information
seaerchin committed Feb 1, 2024
1 parent 139c87d commit 5bc20c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@ app.use(sessionMiddleware)
// Health endpoint
app.use("/v2/ping", (req, res, next) => res.status(200).send("Ok"))

app.use("/v2/iac/email", iacEmailCreationRouter.getRouter())

// Routes layer setup
app.use("/v2/auth", authV2Router.getRouter())
// Endpoints which have require login, but not site access token
Expand All @@ -422,7 +424,6 @@ app.use("/v2/sites/:siteName", authenticatedSitesSubrouterV2)
app.use("/formsg", formsgSiteCreateRouter.getRouter())
app.use("/formsg", formsgSiteLaunchRouter.getRouter())
app.use("/formsg", formsgGGsRepairRouter.getRouter())
app.use("/v2/iac/email/", iacEmailCreationRouter.getRouter())

// catch unknown routes
app.use((req, res, next) => {
Expand Down

0 comments on commit 5bc20c3

Please sign in to comment.