From a7e568d9f10d0a6419a7b07bf08b1f3faba730a9 Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期一, 11 八月 2025 10:04:39 +0800
Subject: [PATCH] #
---
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