Commit cba217cc2935785d41c117892b0c469ef7ae4945
1 parent
d8726767
基于 /proxy-api 实现代理,简化 env.local 配置
Showing
2 changed files
with
3 additions
and
2 deletions
yudao-ui-admin/.env.local
yudao-ui-admin/vue.config.js
| ... | ... | @@ -35,7 +35,7 @@ module.exports = { |
| 35 | 35 | open: true, |
| 36 | 36 | proxy: { |
| 37 | 37 | // detail: https://cli.vuejs.org/config/#devserver-proxy |
| 38 | - [process.env.VUE_APP_BASE_API]: { | |
| 38 | + ['/proxy-api']: { | |
| 39 | 39 | target: `http://localhost:48080`, |
| 40 | 40 | // target: `http://api-dashboard.yudao.iocoder.cn`, |
| 41 | 41 | changeOrigin: true, | ... | ... |