[英]Angular - How to set corporate proxy for http request
Suppose my corporate proxy - >> http://proxy.comapny.com:8080 and Http url - >> http://15.232.2.216/api/get/data?elm=STATE (local network ip adderss) angular running on我的 ip - >> http://15.232.1.178:4200
http url ip address is changed depending on url input so not a solution to set proxy as ip address in proxy.config.json and run command ng serve --proxy-config proxy.config.js like
"*/api" : {
"target" : "http://15.232.2.216",
"secure" : false,
"changeOrigin": true
}
上述问题的解决方案是什么。
首先在您的公司网络团队的帮助下,将 static ip 分配给您的系统。 所以 IP 不会改变,您可以使用 url 来设置代理。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.