I am currently in the development phase of my application and am using a proxy-config.json file to map my API calls to the backend server running on a different port. At the moment, I have to specify each API call in my proxy-config file before using it. I have came across a problem when having to call an address with a parameter. I am not sure how I can implement this using the proxy-config file. I have something like this that is currently working correctly.
"/migrations": {
"target": "http://localhost:9090",
"secure": false,
"changeOrigin": true,
"logLevel": "debug",
"pathRewrite": {
"^/migrations": "/service/api/migrations/"
}
And I want to implement something like this:
"/migrations/{id}": {
"target": "http://localhost:9090",
"secure": false,
"changeOrigin": true,
"logLevel": "debug",
"pathRewrite": {
"^/migrations/{id}": "/service/api/migrations/{id}/"
}
Is something like this possible? Or do I have to resort to something else? Please help. Thank you :)