0

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

Amal
  • 11
  • 2

1 Answers1

0

I think this may be a problem with your configuration, you can install the following steps to configure HSTS:

Open the Internet Information Services (IIS) Manager via Start → Administrative Tools → IIS Manager.

enter image description here

Click on HTTP Response Headers.

enter image description here

Click on Add... in the Actions panel.

enter image description here

Enter the following values in the Add Custom HTTP Response Headers:

Name: Strict-Transport-Security

Value: max-age=31536000

enter image description here

Ding Peng
  • 3,702
  • 1
  • 5
  • 8