From 308d3b3b7883a92a761dfaf4f607a9f4658213cf Mon Sep 17 00:00:00 2001
From: Codex Assistant <codex@example.com>
Date: 星期四, 06 十一月 2025 09:58:25 +0800
Subject: [PATCH] 修改页面

---
 web/vite.config.ts |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/web/vite.config.ts b/web/vite.config.ts
index 95ede8f..d0a27bd 100644
--- a/web/vite.config.ts
+++ b/web/vite.config.ts
@@ -10,12 +10,25 @@
     }
   },
   server: {
+    host: '0.0.0.0',
     port: 3000,
     open: true,
     proxy: {
       '/api': {
-        target: 'http://localhost:8080',
+        target: 'http://127.0.0.1:8080',
         changeOrigin: true,
+        secure: false,
+        configure: (proxy, options) => {
+          proxy.on('error', (err, req, res) => {
+            console.log('proxy error', err);
+          });
+          proxy.on('proxyReq', (proxyReq, req, res) => {
+            console.log('Sending Request to the Target:', req.method, req.url);
+          });
+          proxy.on('proxyRes', (proxyRes, req, res) => {
+            console.log('Received Response from the Target:', proxyRes.statusCode, req.url);
+          });
+        },
         // 涓嶉渶瑕侀噸鍐欒矾寰勶紝鍥犱负鍚庣鐨刢ontext-path灏辨槸/api
         // rewrite: (path) => path.replace(/^\/api/, '/api')
       }

--
Gitblit v1.8.0