Is there any recommendation how to connect fronted which is exposed to public in one service and is running on https with backend that should generally not be exposed and run in other service?
FE, which is posting requests on BE without exposure is running into “This request has been blocked; the content must be served over HTTPS”
Our setup:
To seperate services running in 2 independent VM
React FE, exposed over HTTPS
BE preferably not exposed as from security point of view
Deploy your frontend as a web service, deploy your backend as a private service (i.e., exposed port is not public). Use the private domain to reach the backend from the frontend.
Maybe I do not get something, but when I do exactly like that I get in the web app
auth.ts:72 Mixed Content: The page at 'https://webapp-coala.koyeb.app/dashboard/home' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://my-backend.webapp.internal:8081/api/auth/logout'. This request has been blocked; the content must be served over HTTPS.