Tuesday, April 14, 2020

Force not https traffic to fall over to being https traffic in .NET Core.

In the Configure method in Startup.cs start off with:

if (env.IsDevelopment())
{
   app.UseDeveloperExceptionPage();
}
else
{
   app.UseHttpsRedirection();
}

 
 

In appsettings.json have a https_port property with a number in it!

No comments:

Post a Comment