From 35c422aa74e47a2ee4bea49e6799fefac1b63713 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期五, 21 三月 2025 13:39:47 +0800
Subject: [PATCH] Merge branch 'front' into devlop

---
 rsf-admin/vite.config.js |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/rsf-admin/vite.config.js b/rsf-admin/vite.config.js
index cf12736..ced449c 100644
--- a/rsf-admin/vite.config.js
+++ b/rsf-admin/vite.config.js
@@ -20,6 +20,10 @@
         '/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 +35,7 @@
     },
     base: './',
     envPrefix: 'VITE_',
+    open: true,
+    cors: true,
   };
 });
\ No newline at end of file

--
Gitblit v1.9.1