Powered by the popular Nodejitsu http-proxy
.
$ npm i egg-http-proxy2 --save
// {app_root}/config/plugin.js
exports.httpproxy = {
enable: true,
package: 'egg-http-proxy2',
};
// {app_root}/config/config.default.js
exports.httpproxy = {
proxyTable: [
{
path: "/risws/",
proxy: { target: 'http://t.vy01.com/MedTechWebService/', changeOrigin: true },
},
{
path: "/zsapi/",
proxy: { target: 'http://a.vy01.com/api/', changeOrigin: true },
}],
};
see config/config.default.js for more detail.
Please open an issue here.