2022-08-19 18:23:00 +08:00

14 lines
225 B
Markdown

# proxy 跨域
```javascript
server: {
proxy: {
'/api': {
target: 'https://baidu.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}
}
},
```