diff --git a/app/middleware/forbidden.js b/app/middleware/forbidden.js new file mode 100644 index 0000000..e7e3d15 --- /dev/null +++ b/app/middleware/forbidden.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = () => { + return async function forbidden(ctx, next) { + await next(); + }; +}; diff --git a/config/config.default.js b/config/config.default.js index 2464007..dcfeda1 100644 --- a/config/config.default.js +++ b/config/config.default.js @@ -14,6 +14,7 @@ module.exports = appInfo => { // add your config here config.middleware = [ + 'forbidden', 'hostRedirect', 'openApiAuthorize', 'authorize',