From ffb227b38092d98c7394a2ba5e7dff1135fdb28f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 20 九月 2022 22:02:35 +0800
Subject: [PATCH] 2022-09-20
---
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