我正在尝试使用proxy.config.json
通过角度CLI代理路由API调用。我想通过代理路由到以下网址
url:
http://dom.com/test/{123}/sample
代理网址:
http://loclahost:8080/api/{123}
到目前为止,我在代理配置中拥有什么
proxy.config.json:
"/api/*": {
"target": "http://dom.com/test/{id}/sample",
"secure": false,
"changeOrigin": true,
"logLevel": "debug",
"pathRewrite": {
"^/api": ""
}
}
如何将动态值传递给url?