I am trying to setup angular pwa with our application. We are using proxy.conf.json to route our apis to other backend urls. The following the content of proxy.conf.json:
{
"/api": {
"target": "http://localhost:7002",
"secure": false,
"pathRewrite": {
"^/api": ""
},
"logLevel" "debug"
}
So angular routing api calls to 7002 port and this application was running on 8080 port. As we wantt to setup the pwa with our appication, it is mentioned in the angular docs to not to use "ng serve" for pwa, so we are using http-server to run this application on port 4040 after building this application, but backend api calls are also routing to the same port 4040 instead of 7002 port.
How to rewrite the backend urls of apis with http-server?