I have the following proxy.conf.json, log lines, and api calls.
{
"/first/api/": {
"target": "/first/api/",
"secure": false,
"logLevel": "debug"
},
"/second/api/": {
"target": "/second/api/",
"secure": false,
"logLevel": "debug"
}
[HPM] GET /first/api/values-> /first/api/
[HPM] GET /second/api/dummy -> /second/api/
return this.http.get<any>(this.firstApi + 'values')
return this.http.get<any>(this.secondApi + 'dummy')
Given I can see log lines, I believe the proxy.conf.json is correctly picked up the api calls, but I'm getting a 404 when the call goes out. The logs only output the target, so it's unclear to me how to compose the url I need, for example: localhost/first/api/values
This works correctly when there's only one api:
{
"/api/": {
"target": "/first/",
"secure": false
}
Can anybody advise me on further steps to debug?
SOLVED
yanky_cranky's answer was correct. As an aide in understanding how his answer related to what I was seeing, I also needed to look at my IIS logs. Here I could see what urls were being called.