Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure proxy with Angular 18

I migrated my angular 17 project to angular 18 and found out that proxy.conf.json did not worked for me. What might be the problem here? Thank you in advance

"{
    /api/*": {
    "target": "http://127.0.0.1:8000",
    "secure": false,
    "changeOrigin": true,
    "logLevel": "debug"
  }
}```
like image 767
Preet Bista Avatar asked Feb 27 '26 10:02

Preet Bista


1 Answers

As suggested by @PreetBista adding two ** (/api/** ) after api works fine in most of the cases. Try this first before looking for other solutions

like image 148
Chandan Agarwal Avatar answered Mar 02 '26 01:03

Chandan Agarwal