As far as I'm aware and can find in the docs, and looking through the template code, the UseHsts and UseHttpsRedirection are only supposed to be output if the -au(--auth) flag is set, and it's supposed to default to none if one isn't supplied. Unless this functionality has changed.
Expected behavior
Creates a new webapi project from template with no SSL created in Startup.cs.
Actual behavior
Creates a new webapi project from template with SSL created in Startup.cs, ignoring the default 'None' value for the auth flag.
These lines are added
Steps to reproduce
Ensure you're on 2.1.300
Run
dotnet new webapi -n="example"
Examine Startup.cs in the example project folder.
As far as I'm aware and can find in the docs, and looking through the template code, the UseHsts and UseHttpsRedirection are only supposed to be output if the -au(--auth) flag is set, and it's supposed to default to none if one isn't supplied. Unless this functionality has changed.
Expected behavior
Creates a new webapi project from template with no SSL created in Startup.cs.
Actual behavior
Creates a new webapi project from template with SSL created in Startup.cs, ignoring the default 'None' value for the auth flag.
These lines are added
I compared with the older sdk using a global json setting it to 2.0.3, and the webapi project was created correctly.
Environment data
dotnet --info
output: