Cloud deployments commonly terminate the encrypted HTTPS connection and reverse proxy standard HTTP to the application. You can get a redirect loop without support for the "X-Forwarded-Proto" header. This will tell you if the reverse proxy terminated HTTPS for you while still allowing you to add your rewrite rule.
I'm actually surprised that this isn't supported out of the box.
The intention is to handle X-Forwarded-Proto with UseForwardedHeaders so the rest of the stack doesn't need to special case it. See https://github.com/aspnet/Docs/issues/2384
Cloud deployments commonly terminate the encrypted HTTPS connection and reverse proxy standard HTTP to the application. You can get a redirect loop without support for the "X-Forwarded-Proto" header. This will tell you if the reverse proxy terminated HTTPS for you while still allowing you to add your rewrite rule.
I'm actually surprised that this isn't supported out of the box.