Closed zhilianbi520 closed 2 years ago
proxy设置为: "/api/customerManage": { "target": `http://www.abc.com/customerManage`,// 开发 "changeOrigin": true, "pathRewrite": { "^/api/customerManage": "" } } 代理请求的Request URL:http://localhost:8080/api/customerManage/abc 显示的x-real-url:http://www.abc.com/api/Manage/abc 期望的x-real-url:http://www.abc.com/abc
将customerManage替换成其他xxManage均可请求到正确地址,只有该字段会有此问题,求解。
前面有配置另一个代理导致该问题:
"/api/customer": { "target": `http://www.abc.com/customer`, "changeOrigin": true, "pathRewrite": { "^/api/customer": "" } }
将customerManage替换成其他xxManage均可请求到正确地址,只有该字段会有此问题,求解。