.roadhogrc 中设置 proxy 无效
我的项目是基于 基于react,ant-design,dva,Mock 的一个管理后台。
接口都是MOCK 的。
今天在接口联调的时候,设置.roadhogrc中的proxy,发现并没有生效。API还是指向了默认端口8000
// 接口代理示例
proxy: {
"/api/v1/weather": {
"target": "https://api.seniverse.com/",
"changeOrigin": true,
"pathRewrite": { "^/api/v1/weather": "/v3/weather" }
},
"/api/v2": {
"target": "http://localhost:8080/",
"changeOrigin": true,
"pathRewrite": { "^/api/v2" : "" }
}
},
请高手指点一下