Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Property proxyConfig is not allowed. Angular

adding proxy to angular application

When I tried to add proxy config file to angular.json showing property is not allowed.

like image 710
Harsha Javalkar Avatar asked Jul 23 '26 00:07

Harsha Javalkar


2 Answers

Try instead putting the configuration at architect.serve.options rather than architect.build.options.

https://angular.io/guide/build#proxying-to-a-backend-server

like image 115
Alexander Staroselsky Avatar answered Jul 24 '26 12:07

Alexander Staroselsky


As it said. proxyConfig is not allowed inside build.options object. I think you meant to add it in serve.options. If there are no options then create one:

"serve": {
      "builder": "@angular-devkit/build-angular:dev-server",
      "options": {
        "proxyConfig": "src/proxy.conf.json"
      },
like image 24
Ahmad Alkaf Avatar answered Jul 24 '26 13:07

Ahmad Alkaf