From e79415e6d52425407cffa1701c32c4bc9701e9a3 Mon Sep 17 00:00:00 2001 From: Nixevol Date: Fri, 10 Jul 2026 10:17:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20dev=20=E4=BB=A3=E7=90=86=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E8=B7=AF=E5=BE=84=E7=BB=9F=E4=B8=80=E9=9D=99=E9=BB=98?= =?UTF-8?q?=E5=A4=84=E7=90=86=E6=9C=8D=E5=8A=A1=E5=90=AF=E5=8A=A8=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E6=9C=9F=E7=9A=84=E8=BF=9E=E6=8E=A5=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - /uploads、/t、/trace 代理补 onProxyError,目标未就绪时返回 503 由前端重试 --- apps/admin/vite.config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/admin/vite.config.ts b/apps/admin/vite.config.ts index 6887838..e926023 100644 --- a/apps/admin/vite.config.ts +++ b/apps/admin/vite.config.ts @@ -59,9 +59,9 @@ export default defineConfig({ // 生产由 API 单端口托管全部路径,短链 {BASE_URL}/t/xxx 天然可用;此处让本地行为对齐。 proxy: { '/api': { target: 'http://localhost:3000', changeOrigin: true, configure: onProxyError }, - '/uploads': { target: 'http://localhost:3000', changeOrigin: true }, - '^/t/.*': { target: 'http://localhost:3000', changeOrigin: true }, - '/trace': { target: 'http://localhost:5174', changeOrigin: true, ws: true }, + '/uploads': { target: 'http://localhost:3000', changeOrigin: true, configure: onProxyError }, + '^/t/.*': { target: 'http://localhost:3000', changeOrigin: true, configure: onProxyError }, + '/trace': { target: 'http://localhost:5174', changeOrigin: true, ws: true, configure: onProxyError }, }, }, build: {