2021
03-30
03-30
详解vue配置请求多个服务端解决方案
一、解决方案1.1描述接口context-path后端的两个接口服务请求前缀,如下:前缀1:/bryant前缀2:/1.2vue.config.js配置devServer:{port:8005,proxy:{//第一台服务器配置'/bryant':{target:'http://localhost:8081,ws:true,changeOrigin:true,pathRewrite:{'^/bryant':'/bryant'}},//第二台服务器配置'/':{target:'http://localhost:8082',ws:true,changeOrigin:tr...
继续阅读 >