| | |
| | | // const proxy = require('http-proxy-middleware') |
| | | // const host = 'http://qingqiumarket.cn' |
| | | // const service = 'mkwms/' |
| | | const proxy = require('http-proxy-middleware') |
| | | const options = require('../public/options.json') |
| | | |
| | | module.exports = function(app) {} |
| | | // module.exports = function(app) { |
| | | module.exports = function(app) { |
| | | // app.use(proxy('/webapi', { |
| | | // target: `${host}/${service}webapi`, |
| | | // secure: false, |
| | |
| | | // } |
| | | // })) |
| | | |
| | | // app.use(proxy('/wxpay', { |
| | | // target: `${host}/${service}wxpay`, |
| | | // secure: false, |
| | | // changeOrigin: true, |
| | | // pathRewrite: { |
| | | // '^/wxpay': '/' |
| | | // } |
| | | // })) |
| | | app.use(proxy('/wxpay', { |
| | | target: `${options.host}/${options.service}`, |
| | | secure: false, |
| | | changeOrigin: true |
| | | })) |
| | | |
| | | // app.use(proxy('/trans', { |
| | | // target: `${host}/${service}`, |
| | |
| | | // secure: false, |
| | | // changeOrigin: true |
| | | // })) |
| | | // } |
| | | } |