Skip to content

Commit

Permalink
feat: add forbidden mw
Browse files Browse the repository at this point in the history
  • Loading branch information
xudafeng committed Aug 23, 2020
1 parent 9f88b12 commit 3ec48d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/middleware/forbidden.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

module.exports = () => {
return async function forbidden(ctx, next) {
await next();
};
};
1 change: 1 addition & 0 deletions config/config.default.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = appInfo => {

// add your config here
config.middleware = [
'forbidden',
'hostRedirect',
'openApiAuthorize',
'authorize',
Expand Down

0 comments on commit 3ec48d4

Please sign in to comment.