https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-6.0
look at middle of Post
"
When it isn't possible to add forwarded headers and all requests are secure
In some cases, it might not be possible to add forwarded headers to the requests proxied to the app. If the proxy is enforcing that all public external requests are HTTPS, the scheme can be manually set before using any type of middleware "
Add a custom middleware to set the scheme to https
app.Use((context, next) =>
{
context.Request.Scheme = "https";
return next(context);
});