Moved UseHttpsRedirection to else clause in Startup.cs Configure function

Chap02
Jason Zhu 2022-03-22 23:29:25 +11:00
parent 8dccbf067d
commit 825f144e3a
1 changed files with 4 additions and 2 deletions

View File

@ -43,8 +43,10 @@ namespace QandA
app.UseSwagger();
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "QandA v1"));
}
else
{
app.UseHttpsRedirection();
}
app.UseRouting();