Mid ASP.NET Core

How to enable HTTPS redirection middleware?

Redirects HTTP requests to HTTPS.

app.UseHttpsRedirection();

Add early in the pipeline, before auth or routing.

You can configure HTTPS ports in launchSettings.json or

appsettings.json.

More from ASP.NET Core Tutorial

All questions for this course