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: { proxy: {
"/api/v1": { "/api/v1": {
// target: "https://mock.mengxuegu.com/mock/63218b5fb4c53348ed2bc212/api/v1", // target: "https://mock.mengxuegu.com/mock/63218b5fb4c53348ed2bc212",
target: "https://www.fastmock.site/mock/761e2dda2b8890ab86c928a74e8f6538/api/v1", target: "https://www.fastmock.site/mock/761e2dda2b8890ab86c928a74e8f6538",
ws: true, ws: true,
/** 是否允许跨域 */ /** 是否允许跨域 */
changeOrigin: true, changeOrigin: true
rewrite: (path) => path.replace("/api/v1", "")
} }
} }
}, },