Closed EdrianI closed 3 years ago
Does the backend API still work with this change?
I used a more complex approach for managing multiple API backends this way in the Prometeo dashboard. It allows for a CORS setting as an option to
createProxyMiddleware
:https://github.com/Call-for-Code/Prometeo-Dashboard/blob/master/prometeo-dashboard/src/setupProxy.js
Would this approach help?
Daniel is correct, my initial commit breaks the ability to log in to the site. Adding his suggestion in follow-up commits works locally and when I deploy to our k8s cluster. Seems like this is the right solution for getting past the Invalid Host header problem.
Does the backend API still work with this change?
I used a more complex approach for managing multiple API backends this way in the Prometeo dashboard. It allows for a CORS setting as an option to
createProxyMiddleware
:https://github.com/Call-for-Code/Prometeo-Dashboard/blob/master/prometeo-dashboard/src/setupProxy.js
Would this approach help?