From 79968965303c81787e67be8848b3fb1d427072d7 Mon Sep 17 00:00:00 2001 From: abearxiong Date: Fri, 26 Dec 2025 18:58:50 +0800 Subject: [PATCH] update --- astro.config.mjs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index 4585435..852cf97 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -13,9 +13,7 @@ const isDev = process.env.NODE_ENV === 'development'; let target = process.env.VITE_API_URL || 'http://localhost:51015'; const apiProxy = { target: target, changeOrigin: true, ws: true, rewriteWsOrigin: true, secure: false, cookieDomainRewrite: 'localhost' }; let proxy = { - '/root/': { - target: `${target}/root/`, - }, + '/root/': apiProxy, '/api': apiProxy, '/client': apiProxy, }; @@ -29,16 +27,17 @@ export default defineConfig({ // vue(), // sitemap(), // sitemap must be site has a domain ], - + server: { + port: 7008, + host: '0.0.0.0', + allowedHosts: true, + }, vite: { plugins: [tailwindcss()], define: { BASE_NAME: JSON.stringify(basename || ''), }, server: { - port: 7008, - host: '0.0.0.0', - allowedHosts: true, proxy, }, },