Welcome Guest, Not a member yet? Register   Sign In
CI4.0.3 Error CORS ON GET
#4

(This post was last modified: 09-07-2021, 03:06 AM by 2k10cs86.)

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?
Reply


Messages In This Thread
CI4.0.3 Error CORS ON GET - by erick.costa - 05-29-2020, 12:26 PM
RE: CI4.0.3 Error CORS ON GET - by bhaumikkothari - 05-29-2020, 11:08 PM
RE: CI4.0.3 Error CORS ON GET - by erick.costa - 06-03-2020, 08:14 AM
RE: CI4.0.3 Error CORS ON GET - by 2k10cs86 - 09-07-2021, 03:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB