1.0.4 • Published 5 years ago
egg-http-proxy2 v1.0.4
egg-http-proxy2
Powered by the popular Nodejitsu http-proxy
.
Install
$ npm i egg-http-proxy2 --save
Usage
// {app_root}/config/plugin.js
exports.httpproxy = {
enable: true,
package: 'egg-http-proxy2',
};
Configuration
// {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.
Example
Questions & Suggestions
Please open an issue here.