From f0bcc3aaa31f9658cbed0ef4bcc5b6de486fd903 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期三, 26 三月 2025 12:32:19 +0800
Subject: [PATCH] 物料上级分组不显示问题修复

---
 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