fix: 代理配置无效问题修复

Former-commit-id: c594503031
This commit is contained in:
郝先瑞 2023-06-26 08:37:56 +00:00 committed by Gitee
parent 83d9ea842a
commit ca41d81292
1 changed files with 1 additions and 1 deletions

View File

@ -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 接口地址
},