From b35e3f0bacdbadf5823e06fe8dc6e047089aae38 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 19 一月 2020 00:25:45 +0800 Subject: [PATCH] 2020-01-19 --- src/setupProxy.js | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/setupProxy.js b/src/setupProxy.js index 09da2b2..5c34ad2 100644 --- a/src/setupProxy.js +++ b/src/setupProxy.js @@ -1,8 +1,9 @@ const proxy = require('http-proxy-middleware') +const service = 'mkwms' module.exports = function(app) { app.use(proxy('/webapi', { - target: 'http://qingqiumarket.cn/MKWMS/webapi', + target: `http://qingqiumarket.cn/${service}/webapi`, secure: false, changeOrigin: true, pathRewrite: { @@ -12,7 +13,7 @@ })) app.use(proxy('/zh-CN', { // 鐧诲綍鎺ュ彛 - target: 'http://qingqiumarket.cn/MKWMS/zh-CN', + target: `http://qingqiumarket.cn/${service}/zh-CN`, secure: false, changeOrigin: true, pathRewrite: { @@ -20,6 +21,15 @@ } })) + app.use(proxy('/Upload', { // 鐧诲綍鎺ュ彛 + target: `http://qingqiumarket.cn/${service}/zh-CN/Home/Upload`, + secure: false, + changeOrigin: true, + pathRewrite: { + '^/Upload': '/' + } + })) + app.use(proxy('/local', { target: 'http://127.0.0.1:8888', secure: false, -- Gitblit v1.8.0