salpa-web/config/proxy.ts
2023-12-26 11:21:51 +08:00

39 lines
944 B
TypeScript

/**
* 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
* -------------------------------
* The agent cannot take effect in the production environment
* so there is no configuration of the production environment
* For details, please see
* https://pro.ant.design/docs/deploy
*/
export default {
dev: {
'/api/': {
// target: 'http://192.168.103.172:8080',
target: 'http://192.168.2.58:8080',
changeOrigin: true,
pathRewrite: { '^/api': '' },
},
'/profile/avatar/': {
// target: 'http://192.168.103.172:8080',
target: 'http://192.168.113.251:8080',
changeOrigin: true,
}
},
test: {
'/api/': {
target: 'http://192.168.1.217:8080',
changeOrigin: true,
pathRewrite: { '^/api': '' },
},
},
pre: {
'/api/': {
target: 'your pre url',
changeOrigin: true,
pathRewrite: { '^': '' },
},
},
};