From a7d095c78d1320a4e01bd59dbd07043bf0cf68ba Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 27 五月 2020 12:15:51 +0800 Subject: [PATCH] 2020-05-27 --- src/setupProxy.js | 29 ++++++++++++++++------------- 1 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/setupProxy.js b/src/setupProxy.js index 5c34ad2..a14f43b 100644 --- a/src/setupProxy.js +++ b/src/setupProxy.js @@ -1,9 +1,12 @@ const proxy = require('http-proxy-middleware') -const service = 'mkwms' +const host = 'http://qingqiumarket.cn' +const service = 'mkwms/' +// const host = 'http://cloud.mk9h.cn' +// const service = '' module.exports = function(app) { app.use(proxy('/webapi', { - target: `http://qingqiumarket.cn/${service}/webapi`, + target: `${host}/${service}webapi`, secure: false, changeOrigin: true, pathRewrite: { @@ -13,7 +16,7 @@ })) app.use(proxy('/zh-CN', { // 鐧诲綍鎺ュ彛 - target: `http://qingqiumarket.cn/${service}/zh-CN`, + target: `${host}/${service}zh-CN`, secure: false, changeOrigin: true, pathRewrite: { @@ -21,8 +24,8 @@ } })) - app.use(proxy('/Upload', { // 鐧诲綍鎺ュ彛 - target: `http://qingqiumarket.cn/${service}/zh-CN/Home/Upload`, + app.use(proxy('/Upload', { + target: `${host}/${service}zh-CN/Home/Upload`, secure: false, changeOrigin: true, pathRewrite: { @@ -30,12 +33,12 @@ } })) - app.use(proxy('/local', { - target: 'http://127.0.0.1:8888', - secure: false, - changeOrigin: true, - pathRewrite: { - '^/local': '/' - } - })) + // app.use(proxy('/local', { + // target: 'http://127.0.0.1:8888', + // secure: false, + // changeOrigin: true, + // pathRewrite: { + // '^/local': '/' + // } + // })) } \ No newline at end of file -- Gitblit v1.8.0