0
votes

I have the following content inside my proxy.config.json which is being passed to ng serve via --proxy-config proxy.config.json.

"/api/*": {
"target":"http://myserver.com",
"secure": false,
"pathRewrite": {"^/api" : ""},
"changeOrigin": true,
"logLevel": "debug"

}

Suppose a GET from angular was http://localhost:4200/api/auth. Here is what I see in the console

[HPM] GET /api/auth -> http://myserver.com

What is happening to the /auth?

1

1 Answers

0
votes

That's normal behavior of Angular-CLI proxy. It works, just displays the wrong information but makes a request correctly.