From c45a375e5b4ce0e33c7fc8a1aecdad67d60acc9e Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 01 三月 2021 15:09:06 +0800 Subject: [PATCH] 2021-03-01 --- src/setupProxy.js | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/setupProxy.js b/src/setupProxy.js index 1aca9db..d5d27d1 100644 --- a/src/setupProxy.js +++ b/src/setupProxy.js @@ -1,8 +1,6 @@ const proxy = require('http-proxy-middleware') const host = 'http://qingqiumarket.cn' const service = 'mkwms/' -// const host = 'http://cloud.mk9h.cn' -// const service = '' module.exports = function(app) { app.use(proxy('/webapi', { @@ -41,4 +39,13 @@ '^/wxpay': '/' } })) + + app.use(proxy('/trans', { + target: `${host}/${service}trans`, + secure: false, + changeOrigin: true, + pathRewrite: { + '^/trans': '/' + } + })) } \ No newline at end of file -- Gitblit v1.8.0