Fix mix content in mfe


Currently, I’m using Caddy to listen for HTTPS and MKCert to create a dummy certificate. I successfully accessed the LMS homepage at https://local.openedx.io, but when I tried to access the MFEs’ addresses, I got a mixed content error: “Mixed Content: The page at ‘https://apps.local.openedx.io/authn/login?next=%2F’ was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ‘http://local.openedx.io:8000/login_refresh’. This request has been blocked; the content must be served over HTTPS.”

This is my current Caddy configuration.

local.openedx.io {
tls /home/duc/dev-frontend/local.openedx.io+2.pem /home/duc/dev-frontend/local.openedx.io+>
reverse_proxy localhost:8000
}

apps.local.openedx.io {
tls /home/duc/dev-frontend/local.openedx.io+2.pem /home/duc/dev-frontend/local.openedx.io+>
reverse_proxy localhost:1999
}