egg-http-proxy
egg-http-proxy copied to clipboard
代理匹配到了 为什么还会走路由 ?
路由里有一条
router.get('/*', controller.tapd.staticMatch)
config.default.js
config.httpProxy = {
'/self': {
target: 'https://api.xxxx.cn',
pathRewrite: {
'^/self': ''
}
}
};
plugin.js
httpProxy: {
enable: true,
package: 'egg-http-proxy',
}
浏览器请求
http://127.0.0.1:7001/self/tasks/count?workspace_id=59395005