You should only configure HSTS in !development app.UseHsts(options => options.MaxAge(days: 365).IncludeSubdomains()); needs wrapping with an environment check, and when a system uses HSTS for the first time the recommendation is to start with a small value, start with 5 minutes, see https://hstspreload.org/#deployment-recommendations
You should only configure HSTS in !development
app.UseHsts(options => options.MaxAge(days: 365).IncludeSubdomains());
needs wrapping with an environment check, and when a system uses HSTS for the first time the recommendation is to start with a small value, start with 5 minutes, see https://hstspreload.org/#deployment-recommendations