From daf42d3c347be272b436f08ff25dfa37f0952852 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 19 一月 2020 11:36:56 +0800 Subject: [PATCH] 2020-01-19 --- src/setupProxy.js | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/setupProxy.js b/src/setupProxy.js index f358dbc..e2434ee 100644 --- a/src/setupProxy.js +++ b/src/setupProxy.js @@ -1,8 +1,10 @@ const proxy = require('http-proxy-middleware') +const host = 'http://qingqiumarket.cn' +const service = 'mkwms/' module.exports = function(app) { app.use(proxy('/webapi', { - target: 'http://qingqiumarket.cn/MKWMS/webapi', + target: `${host}/${service}webapi`, secure: false, changeOrigin: true, pathRewrite: { @@ -12,7 +14,7 @@ })) app.use(proxy('/zh-CN', { // 鐧诲綍鎺ュ彛 - target: 'http://qingqiumarket.cn/MKWMS/zh-CN', + target: `${host}/${service}zh-CN`, secure: false, changeOrigin: true, pathRewrite: { @@ -20,12 +22,12 @@ } })) - app.use(proxy('/mksepc', { - target: 'http://minkesoft.com/mksepc', + app.use(proxy('/Upload', { // 鐧诲綍鎺ュ彛 + target: `${host}/${service}zh-CN/Home/Upload`, secure: false, changeOrigin: true, pathRewrite: { - '^/mksepc': '/' + '^/Upload': '/' } })) -- Gitblit v1.8.0