Skip to content

Commit

Permalink
fix(console): do not block other middlewares
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Aug 5, 2022
1 parent 5c7723a commit ac5f353
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions packages/console/README.md

This file was deleted.

3 changes: 3 additions & 0 deletions packages/console/src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ class HttpService extends DataService<string[]> {
const { uiPath, root } = this.config

this.ctx.router.get(uiPath + '(/.+)*', async (ctx, next) => {
await next()
if (ctx.body || ctx.response.body) return

// add trailing slash and redirect
if (ctx.path === uiPath && !uiPath.endsWith('/')) {
return ctx.redirect(ctx.path + '/')
Expand Down

0 comments on commit ac5f353

Please sign in to comment.