In your examples you state that AddDefaultSecurityHeaders and AddDefaultApiSecurityHeaders add the Strict-Transport-Security: max-age=31536000; includeSubDomains header. According to your code they only call AddStrictTransportSecurityMaxAge and not AddStrictTransportSecurityMaxAgeIncludeSubDomains.
In your examples you state that
AddDefaultSecurityHeaders
andAddDefaultApiSecurityHeaders
add theStrict-Transport-Security: max-age=31536000; includeSubDomains
header. According to your code they only callAddStrictTransportSecurityMaxAge
and notAddStrictTransportSecurityMaxAgeIncludeSubDomains
.