My application having multiple request to different API URL's request, when a particular component renders.
I am facing the CORS issue since I am using multiple URLs' , so in order to avoid i haved installed http-proxy-middleware package.
In setupProxy.js, I used below code. which is not working
Note: I having same endpoints with different api urls's in my project. How deal with this cases
app.use(proxy("/rest/V1/orders",{target:"https://example.com/",changeOrigin:true})); app.use(proxy("/rest/V1/orders",{target:"https://example.net/",changeOrigin:true})); app.use(proxy("/rest/V1/orders",{target:"https://example.org/",changeOrigin:true}));