问题
I have Angular project with next proxy:
const PROXY_CONFIG = {
"/teploset": {
"target": "http://95.1.0.3:8080/",
"secure": false,
"bypass": function (req, res, proxyOptions) {
console.log("1");
},
"changeOrigin": true
}
}
module.exports = PROXY_CONFIG;
I need proxy because of CORS issue when requests go to back-end. Everything works good at home, but problems are at work where we use corporate proxy. So I get next error:
[HPM] Error occurred while trying to proxy request /teploset/login from localhost:4200 (ENETUNREACH)
Any ideas?
来源:https://stackoverflow.com/questions/47055038/angular-proxy-corporate-proxy