apim-tools
Version:
APIM Tools
26 lines (20 loc) • 607 B
JavaScript
/**
* @file mock manage static file request handler
* @author sparklewhy@gmail.com
*/
;
/**
* 处理 mock 管理客户端的静态资源请求
*
* @param {Object} context 请求上下文
* @param {Function} next 下一个请求处理器
* @return {*}
*/
function processMockManageStaticRequest(context, next) {
if (!context.isMockClientRequest()) {
return next();
}
context.logger.debug('process mock manage static asset request', context.path);
context.staticMw(context.req, context.res, next);
}
module.exports = exports = processMockManageStaticRequest;