@AYamshanov, the 2 years in the picture you attached is actually the best practice for the header. Actually, if I turn off HSTS, the duplicate one is not added, but this is not a solution for me. Because I want to change it to 2 years or at least 6 months, not the default value.
In short, if...