From 32973f90869ff466401759c23681fc06fa65c71a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 10 六月 2025 23:06:50 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/setupProxy.js | 23 +++++++++-------------- 1 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/setupProxy.js b/src/setupProxy.js index 3902dd3..4d69c53 100644 --- a/src/setupProxy.js +++ b/src/setupProxy.js @@ -1,9 +1,7 @@ -// const proxy = require('http-proxy-middleware') -// const host = 'http://qingqiumarket.cn' -// const service = 'mkwms/' +const proxy = require('http-proxy-middleware') +const options = require('../public/options.json') -module.exports = function(app) {} -// module.exports = function(app) { +module.exports = function(app) { // app.use(proxy('/webapi', { // target: `${host}/${service}webapi`, // secure: false, @@ -32,14 +30,11 @@ // } // })) -// app.use(proxy('/wxpay', { -// target: `${host}/${service}wxpay`, -// secure: false, -// changeOrigin: true, -// pathRewrite: { -// '^/wxpay': '/' -// } -// })) + app.use(proxy('/wxpay', { + target: `${options.host}/${options.service}`, + secure: false, + changeOrigin: true + })) // app.use(proxy('/trans', { // target: `${host}/${service}`, @@ -52,4 +47,4 @@ // secure: false, // changeOrigin: true // })) -// } \ No newline at end of file +} \ No newline at end of file -- Gitblit v1.8.0