From 729fb5e7f41f45c6962993d86c3a4eb81c2c784b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 10 六月 2025 23:06:06 +0800 Subject: [PATCH] Merge branch 'develop' --- src/setupProxy.js | 83 +++++++++++++++++++---------------------- 1 files changed, 39 insertions(+), 44 deletions(-) diff --git a/src/setupProxy.js b/src/setupProxy.js index 78c88f7..4d69c53 100644 --- a/src/setupProxy.js +++ b/src/setupProxy.js @@ -1,55 +1,50 @@ const proxy = require('http-proxy-middleware') -const host = 'http://qingqiumarket.cn' -const service = 'mkwms/' +const options = require('../public/options.json') -// module.exports = function(app) {} module.exports = function(app) { - // app.use(proxy('/webapi', { - // target: `${host}/${service}webapi`, - // secure: false, - // changeOrigin: true, - // pathRewrite: { - // '^/webapi': '/' - // } - // // cookieDomainRewrite: "http://localhost:3000" - // })) +// app.use(proxy('/webapi', { +// target: `${host}/${service}webapi`, +// secure: false, +// changeOrigin: true, +// pathRewrite: { +// '^/webapi': '/' +// } +// // cookieDomainRewrite: "http://localhost:3000" +// })) - // app.use(proxy('/zh-CN', { // 鐧诲綍鎺ュ彛 - // target: `${host}/${service}zh-CN`, - // secure: false, - // changeOrigin: true, - // pathRewrite: { - // '^/zh-CN': '/' - // } - // })) +// app.use(proxy('/zh-CN', { // 鐧诲綍鎺ュ彛 +// target: `${host}/${service}zh-CN`, +// secure: false, +// changeOrigin: true, +// pathRewrite: { +// '^/zh-CN': '/' +// } +// })) - // app.use(proxy('/Upload', { - // target: `${host}/${service}zh-CN/Home/Upload`, - // secure: false, - // changeOrigin: true, - // pathRewrite: { - // '^/Upload': '/' - // } - // })) +// app.use(proxy('/Upload', { +// target: `${host}/${service}zh-CN/Home/Upload`, +// secure: false, +// changeOrigin: true, +// pathRewrite: { +// '^/Upload': '/' +// } +// })) - // app.use(proxy('/wxpay', { - // target: `${host}/${service}wxpay`, - // secure: false, - // changeOrigin: true, - // pathRewrite: { - // '^/wxpay': '/' - // } - // })) - - app.use(proxy('/trans', { - target: `${host}/${service}`, + app.use(proxy('/wxpay', { + target: `${options.host}/${options.service}`, secure: false, changeOrigin: true })) - app.use(proxy('/api', { // 鏃疯闈㈡澘鏈烘帴鍙f祴璇� - target: `http://192.168.1.66:80`, - secure: false, - changeOrigin: true - })) +// app.use(proxy('/trans', { +// target: `${host}/${service}`, +// secure: false, +// changeOrigin: true +// })) + +// app.use(proxy('/api', { // 鏃疯闈㈡澘鏈烘帴鍙f祴璇� +// target: `http://192.168.1.66:80`, +// secure: false, +// changeOrigin: true +// })) } \ No newline at end of file -- Gitblit v1.8.0