I have a webapplication deployed, and it worked just fine while I it run on http. However now that the frontend is https, it will no longer connect to the backend, no matter what.
If I leave the frontend API call on http, I will get an ERR_NETWORK error with Mixed Content: The page at 'https://mywebapp.com/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://myserverip:myport/api/login'. This request has been blocked; the content must be served over HTTPS.
If I switch the http to https in the API call on the frontend, instead I get an ERR_CONNECTION_CLOSED error.
If I switch even the backend port mapping and proxy port to https in Dokku, then however I get an ERR_SSL_PROTOCOL_ERROR.
So what am I supposed to do?