From bd06958321afa706f32287c71bd219eb0622c86c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 10 十二月 2019 16:31:45 +0800 Subject: [PATCH] 2019-12-10 --- src/setupProxy.js | 14 +++----------- 1 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/setupProxy.js b/src/setupProxy.js index f358dbc..8e6ff05 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,20 +13,11 @@ })) app.use(proxy('/zh-CN', { // 鐧诲綍鎺ュ彛 - target: 'http://qingqiumarket.cn/MKWMS/zh-CN', + target: `http://qingqiumarket.cn/${service}/zh-CN`, secure: false, changeOrigin: true, pathRewrite: { '^/zh-CN': '/' - } - })) - - app.use(proxy('/mksepc', { - target: 'http://minkesoft.com/mksepc', - secure: false, - changeOrigin: true, - pathRewrite: { - '^/mksepc': '/' } })) -- Gitblit v1.8.0