Somehow this solution is not proxying my requests correctly. My ionic setup is as follows:
ionic (Ionic CLI) : 4.3.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.15
@angular-devkit/build-angular : 0.8.7
@angular-devkit/schematics : 0.8.7
@angular/cli : 6.2.7
@ionic/angular-toolkit : 1.1.0
My proxy.conf.json looks like below:
{
“/v1”: {
“target”: “https://www.pingaze.com/”,
“changeOrigin”: true,
“secure”: false,
“logLevel”: “debug”
}
}
Anf angular.json as follows:
…
“serve”: {
“builder”: “@angular-devkit/build-angular:dev-server”,
“options”: {
“browserTarget”: “app:build”,
“proxyConfig”: “proxy.conf.json”
},
But when I call the API on my server I still get the following error:
status: 404, statusText: “Not Found”, url: “http://localhost:8100/v1/getfilelist.php”, ok: false, name: “HttpErrorResponse”, message: “Http failure response for http://localhost:8100/v1/getfilelist.php: 404 Not Found”, error: “No input file specified.\n” }
As you can see, the request is still going to localhost:8100 instead of my server configured in the proxy.conf.json.
Any help would be highly appreciated.