From 4e0470a90f640f57d8f8af6708eb05f77bf561dd Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期一, 27 十月 2025 21:58:46 +0800
Subject: [PATCH] #新增 1. rsf-server添加上报调用接口 2,rsf-server添加盘点调用接口
---
rsf-admin/vite.config.js | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/rsf-admin/vite.config.js b/rsf-admin/vite.config.js
index cf12736..76153c8 100644
--- a/rsf-admin/vite.config.js
+++ b/rsf-admin/vite.config.js
@@ -15,11 +15,16 @@
server: {
port: 8122,
host: '0.0.0.0',
+ open: true,
// available in run dev
proxy: {
'/rsf-server': {
target: `http://${env.VITE_BASE_IP}:${env.VITE_BASE_PORT}`,
changeOrigin: true,
+ bypass: (req, res, options) => {
+ const proxyUrl = `${options.target}${req.url}`;
+ res.setHeader('x-rel-url', proxyUrl);
+ }
// rewrite: (path) => path.replace(/^\/api/, ''),
},
'/ws': {
@@ -31,5 +36,7 @@
},
base: './',
envPrefix: 'VITE_',
+ open: true,
+ cors: true,
};
});
\ No newline at end of file
--
Gitblit v1.9.1