Parent: #199
Api/Program.cs calls UseHttpsRedirection() but never UseHsts(). The canonical ASP.NET Core middleware order calls HSTS before HTTPS redirection in production behind TLS.
Fix:
if (!app.Environment.IsDevelopment())
{
app.UseHsts();
}
app.UseHttpsRedirection();
Severity: medium.
Refs:
Parent: #199
Api/Program.cscallsUseHttpsRedirection()but neverUseHsts(). The canonical ASP.NET Core middleware order calls HSTS before HTTPS redirection in production behind TLS.Fix:
Severity: medium.
Refs: