打通接口请求

This commit is contained in:
MaxShen
2025-03-18 15:43:07 +08:00
parent ff6e140045
commit df28f4799a
3 changed files with 11 additions and 5 deletions

View File

@@ -38,10 +38,10 @@ export default (config: any) => {
},
proxy: {
// 配置跨域代理
'/official': {
target: 'http://222.20.126.217:9527', // 目标服务器地址
'/gateway': {
target: 'http://223.76.236.155:20011', // 目标服务器地址
changeOrigin: true, // 允许跨域
rewrite: (path) => path.replace(/^\/official/, '/official'), // 重写路径
rewrite: (path) => path.replace(/^\/gateway/, '/gateway'), // 重写路径
}
}
},