Hello,
I have followed what you have mentioned that this CORS issue is resolved by angular proxy, I have created a simple proxy and giving me the below error:
Code:
[HPM] Error occurred while trying to proxy request /api/v1/login from localhost:4200 to http://localhost:8080 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
In browser console:
Code:
Backend returned code 504, body was: Error occured while trying to proxy to: localhost:4200/api/v1/login
Where
Code:
ECONNREFUSED (Connection refused): No connection could be made because the target machine actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host.
And here is the proxy:
Code:
{
"/api/*": {
"target": "http://localhost:8080",
"secure": false,
"changeOrigin": true,
"logLevel": "debug"
}
}
Any idea whats wrong with that?