Skip to content

Commit

Permalink
fix: move auth mw before api router
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-yarmosh committed Sep 10, 2024
1 parent 47b3ec6 commit 0bdbb03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/http/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ app
// Error handler must always be the first middleware in a chain unless you know what you are doing ;)
.use(errorHandlerMw)
.use(corsHandler())
.use(authenticate())
.use(rootRouter.routes())
.use(healthRouter.routes())
.use(authenticate())
.use(apiRouter.routes())
.use(apiRouter.allowedMethods())
.use(koaStatic(publicPath, { format: false }));
Expand Down

0 comments on commit 0bdbb03

Please sign in to comment.