From ca41d81292a417010ff16db698a0191d173e4cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=9D=E5=85=88=E7=91=9E?= <1490493387@qq.com> Date: Mon, 26 Jun 2023 08:37:56 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=A3=E7=90=86=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=97=A0=E6=95=88=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D=20Former?= =?UTF-8?q?-commit-id:=20c594503031bcd1563cc59c6ddb8e8f7978e78dd9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vite.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index 80d0cc26..6f208d78 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -45,7 +45,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => { [env.VITE_APP_BASE_API]: { target: "http://vapi.youlai.tech", // 线上接口地址 // target: 'http://localhost:8989', // 本地接口地址 , 后端工程仓库地址:https://gitee.com/youlaiorg/youlai-boot - changeOrigin: false, + changeOrigin: true, rewrite: (path) => path.replace(new RegExp("^" + env.VITE_APP_BASE_API), ""), // 替换 /dev-api 为 target 接口地址 },