fix: 代理配置无效问题修复
Former-commit-id: c594503031bcd1563cc59c6ddb8e8f7978e78dd9
This commit is contained in:
@@ -45,7 +45,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
|
|||||||
[env.VITE_APP_BASE_API]: {
|
[env.VITE_APP_BASE_API]: {
|
||||||
target: "http://vapi.youlai.tech", // 线上接口地址
|
target: "http://vapi.youlai.tech", // 线上接口地址
|
||||||
// target: 'http://localhost:8989', // 本地接口地址 , 后端工程仓库地址:https://gitee.com/youlaiorg/youlai-boot
|
// target: 'http://localhost:8989', // 本地接口地址 , 后端工程仓库地址:https://gitee.com/youlaiorg/youlai-boot
|
||||||
changeOrigin: false,
|
changeOrigin: true,
|
||||||
rewrite: (path) =>
|
rewrite: (path) =>
|
||||||
path.replace(new RegExp("^" + env.VITE_APP_BASE_API), ""), // 替换 /dev-api 为 target 接口地址
|
path.replace(new RegExp("^" + env.VITE_APP_BASE_API), ""), // 替换 /dev-api 为 target 接口地址
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user