.Net 6 core on docker image deployment

I deployed a docker image that houses a .Net 6 core console application, but the actual deployed site keeps giving the error of “ERR_TOO_MANY_REDIRECTS”. I have the following settings for Startup.cs file:

app.UseRewriter(new RewriteOptions().AddRedirectToHttpsPermanent());
app.Use((context, next) =>
context.Request.Headers.Add(“X-Forwarded-Proto”, “https”);
return next();

What do I need to do in order to get rid of this infinite looping of redirecting? It seems like the redirecting is always back to the same URL as well.


I’d suggest removing the https redirection code, that’s performed at the platform level and might be the culprit here,


John B
Render Support, UTC :uk:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.