Problems deploying FastAPI using gunicorn: getting constant 307 temporary redirect

I believe that’s the HTTPSRedirectMiddleware.

Looking at it, it’s not accounting for proxies (headers like x-forward-ssl and x-forwarded-proto)?

I would remove that. I believe by default we force an https redirect unless disabled.