Skip to content

Latest commit

 

History

History
76 lines (58 loc) · 1.93 KB

File metadata and controls

76 lines (58 loc) · 1.93 KB

egg-easy-proxy

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

一个egg的代理插件,适配midwayjs,基于 egg-proxy。

依赖说明

依赖的 egg 版本

egg-easy-proxy 版本 egg 2.x
1.x 😁
0.x

开启插件

// config/plugin.js
exports.easyProxy = {
  enable: true,
  package: 'egg-easy-proxy',
};

使用场景

// {app_root}/config/config.default.js
exports.easyProxy = [
  {
    host: 'http://127.0.0.1:1111',
    match: /^\/test1/,
  },
  // {
  //   host: 'https://github.com',
  //   match: /^\/explore/,
  // },
];

详细配置

请到 config/config.default.js 查看详细配置项说明。

单元测试

$ npm run test

提问交流

请到 issues 异步交流。

License

MIT