Enable HTTP Strict Transport Security (HSTS) with spring boot application

后端 未结 2 978
再見小時候
再見小時候 2020-12-17 05:24

I have followed the article https://docs.spring.io/spring-security/site/docs/4.0.2.RELEASE/reference/html/headers.html#headers-hsts to enable HSTS header on my spring boot a

相关标签:
2条回答
  • 2020-12-17 06:14

    It will only appear after the first request via HTTPS.

    0 讨论(0)
  • 2020-12-17 06:19

    In accordance with RFC6797, the HSTS header is only injected into HTTPS responses.

    Source: https://docs.spring.io/spring-security/site/docs/4.0.2.RELEASE/reference/htmlsingle/#headers-hsts

    0 讨论(0)
提交回复
热议问题