Skip to content

shz8/egg-proxy

Repository files navigation

egg-http-proxy2

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Powered by the popular Nodejitsu http-proxy. GitHub stars

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.

License

MIT

About

egg-plugin http-proxy apigateway

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published