I configured the IIS to get the HSTS header. When I tried to verify using the curl command. I got the header sometimes and sometimes I'm not getting it.
In the below image you can see I accessed the same site using the curl command. The first time I got the HSTS header and the second time I didn't get it. Any help would be appreciables