Open

Description
Currently, the default value for HTTP Strict Transport Security (HSTS) max-age is set to 30 days.
According to hstspreload.org, it is recommended that the minimum value should be at least 1 year, with a preferable value of 2 years.
The current default value may not align with modern security best practices, and it might be beneficial to reconsider it.
I propose that we reconsider the default value and update it to a more secure and recommended value, such as 1 year.
Also, setting a longer default max-age value will avoid additional configuration, as it is very common to reconfigure this value as follows:
builder.Services.AddHsts(options =>
{
options.MaxAge = TimeSpan.FromDays(365); // Common practice to set it to 1 year or more
});