api.js 346 Bytes
'use strict';

module.exports = app => {
    const { router, controller } = app;
    const { proxy } = controller;
    // 给proxy设置token 
    router.get(/^\/api\/[\w/]+/, 'proxy.get');
    // router.post(/^\/api\/[\w/]+/, 'proxy.post');
    // router.put(/^\/api\/[\w/]+/, 'proxy.put');
    // router.delete(/^\/api\/[\w/]+/, 'proxy.del');
}