Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-20 10:59:21 +08:00

chore: 简化反向代理配置

This commit is contained in:
pany 2023-08-07 09:34:11 +08:00
parent a47cea68a9
commit 45b0bea731

View File

@ -37,12 +37,11 @@ export default (configEnv: ConfigEnv): UserConfigExport => {
/** 接口代理 */
proxy: {
"/api/v1": {
// target: "https://mock.mengxuegu.com/mock/63218b5fb4c53348ed2bc212/api/v1",
target: "https://www.fastmock.site/mock/761e2dda2b8890ab86c928a74e8f6538/api/v1",
// target: "https://mock.mengxuegu.com/mock/63218b5fb4c53348ed2bc212",
target: "https://www.fastmock.site/mock/761e2dda2b8890ab86c928a74e8f6538",
ws: true,
/** 是否允许跨域 */
changeOrigin: true,
rewrite: (path) => path.replace("/api/v1", "")
changeOrigin: true
}
}
},