1

I've updated the Angular application to version 18 (18.0.1). I'm facing some issues regarding the http requests on localhost. For most of the requests I'm getting a 404. I'm behind a corporate proxy and I have a file configured which was not touch lately. The only think which changed was basically the angular version from 17.1.0 to 18.0.1.https-proxy-agent package is v5 (I've also tried to update it to 7 but no changes).

Did anyone faced similar issues? I don't know exactly what could be the problem and where to look.

1 Answer 1

0

Ensure that your proxy.conf.json file is correctly configured

    {
  "/api": {
    "target": "http://backend-server:port",
    "secure": false,
    "changeOrigin": true
  }
}

Make sure the angular.json file has the correct configurations

"serve": {
  "options": {
    "proxyConfig": "src/proxy.conf.json"
  }
}
2
  • It is configured as you say. It didn't changed before the update and was working. After the update... some requests are just failing with 404.
    – anyway07
    Commented Jul 8 at 6:24
  • Same problem here in my project. 404 errors when reaching out to backend via api. Any suggestions?
    – Jojoseph
    Commented 3 hours ago

Not the answer you're looking for? Browse other questions tagged or ask your own question.