From my understanding, it seems that you are facing a CORS error while trying to invoke an API call from the React app to the Node backend. You have already enabled CORS with * in the Node backend and tested the frontend to backend communication over the private endpoint using the frontend SCM console, which works fine. However, the issue occurs only when you launch the React app from the browser.
It is possible that the browser is resolving the backend hostname to its public IP, which is causing the error. To resolve this issue, you can try the following steps:
- Verify that the backend URL is correctly configured through an environment variable in the frontend app service.
- Check if the backend URL is correctly referenced in the React app.
- Ensure that the backend app is not accessible from the public network by disabling public access in the Azure portal.
- If the issue persists, you can try using a proxy server to resolve the backend hostname to the private IP address.
I hope these steps will help you resolve the issue. Let me know if you need further assistance.