From c834537aadb80baad341eaf26ec6d88d41b5f7c5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 14 一月 2021 21:25:09 +0800 Subject: [PATCH] 2021-01-14 --- src/setupProxy.js | 27 +++++++++++++++++++-------- 1 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/setupProxy.js b/src/setupProxy.js index 5c34ad2..f0f93f1 100644 --- a/src/setupProxy.js +++ b/src/setupProxy.js @@ -1,9 +1,10 @@ const proxy = require('http-proxy-middleware') -const service = 'mkwms' +const host = 'http://bms-test.kresstools.cn' +const service = 'oc/' 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 +14,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 +22,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 +31,22 @@ } })) - app.use(proxy('/local', { - target: 'http://127.0.0.1:8888', + app.use(proxy('/wxpay', { + target: `${host}/${service}wxpay`, secure: false, changeOrigin: true, pathRewrite: { - '^/local': '/' + '^/wxpay': '/' } })) + + app.use(proxy('/Home', { + target: `${host}/Home`, + secure: false, + changeOrigin: true, + pathRewrite: { + '^/Home': '/' + } + // cookieDomainRewrite: "http://localhost:3000" + })) } \ No newline at end of file -- Gitblit v1.8.0