Skip to content

Commit

Permalink
middleware post snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Feb 19, 2018
1 parent 17697be commit 61d909f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,7 @@ provider.app.middleware.unshift(async (ctx, next) => {
// you may target a specific action here by matching `ctx.path`
console.log('middleware pre', ctx.path);
await next();
console.log('middleware post', ctx._matchedRouteName);
// post-processing
// since internal route matching was already executed you may target a specific action here
// checking `ctx._matchedRouteName`, the unique route names used are "authorization", "token",
Expand Down

0 comments on commit 61d909f

Please sign in to comment.