egg-http-proxy2

shz8
js
egg-http-proxy2 JS library on GitHub egg-http-proxy2 JS library on npm Download egg-http-proxy2 JS library

egg-plugin http-proxy

Version 1.0.4 License MIT Vulnerabilities 0
egg-http-proxy2 has no homepage
egg-http-proxy2 JS library on GitHub
egg-http-proxy2 JS library on npm
Download egg-http-proxy2 JS library
Keywords
eggeggPluginegg-plugin
<script type="module"> import eggHttpProxy2 from 'https://cdn.jsdelivr.net/npm/egg-http-proxy2@1.0.4/+esm' </script>
Learn more

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