I have proxy.conf.json
{
"/api/*": {
"target": "https://api.dev.xyz.com",
"secure": false,
"changeOrigin": true,
"pathRewrite": { "^/api": "" },
"logLevel": "debug"
}
}
and I have ng serve --proxy-config proxy.conf.json
in package.json
file. When I run my project with npm start
it showing error
ng serve --proxy-config proxy.conf.json
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
10% building 3/3 modules 0 active[HPM] Proxy created: /api -> https://api.dev.xyz.com
[HPM] Proxy rewrite rule created: "^/api" ~> ""
[HPM] Subscribed to http-proxy events: [ 'error', 'close' ]
I have checked multiple stack-overflow answers reference link, but still I have been stuck here from long time.