If you run into an error where calls are made through http instead of https, it could be that your FastAPI application isn't trusting the reverse proxy's headers overriding the scheme (the X-Forwarded-Proto header that's passed when it handles a TLS request). We discover this during debugging @GabrielLunesu project. If this a common issue for FastAPI users we should note this somewhere to aid to a smooth deployment.
https://stackoverflow.com/questions/63511413/fastapi-redirection-for-trailing-slash-returns-non-ssl-link
This is also documented on FastAPI: https://fastapi.tiangolo.com/advanced/behind-a-proxy/
If you run into an error where calls are made through http instead of https, it could be that your FastAPI application isn't trusting the reverse proxy's headers overriding the scheme (the X-Forwarded-Proto header that's passed when it handles a TLS request). We discover this during debugging @GabrielLunesu project. If this a common issue for FastAPI users we should note this somewhere to aid to a smooth deployment.
https://stackoverflow.com/questions/63511413/fastapi-redirection-for-trailing-slash-returns-non-ssl-link
This is also documented on FastAPI: https://fastapi.tiangolo.com/advanced/behind-a-proxy/