diff --git a/astro.config.mjs b/astro.config.mjs index 727f60f..118abb8 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -7,12 +7,13 @@ import tailwindcss from '@tailwindcss/vite'; import basicSsl from '@vitejs/plugin-basic-ssl'; const isDev = process.env.NODE_ENV === 'development'; -const plugins = [tailwindcss()] +const plugins = [tailwindcss()]; const isCNB = process.env.CNB === 'true'; if (isDev && !isCNB) { plugins.push(basicSsl()); } -let target = process.env.VITE_API_URL || 'http://localhost:3000'; +let target = process.env.VITE_API_URL || 'https://localhost:51015'; +const apiProxy = { target: target, changeOrigin: true, ws: true, rewriteWsOrigin: true, secure: false, cookieDomainRewrite: 'localhost' }; let proxy = { '/root/center/': { target: `${target}/root/center/`, @@ -20,13 +21,8 @@ let proxy = { '/user/login/': { target: `${target}/user/login/`, }, - '/api': { - target: target, - changeOrigin: true, - ws: true, - rewriteWsOrigin: true, - cookieDomainRewrite: 'localhost', - }, + '/api': apiProxy, + '/client': apiProxy, }; export default defineConfig({