Spring HTTP严格传输安全性(HSTS)和FireFox

问题描述 投票:1回答:2

默认情况下,spring security(4.0.1.Release)将HSTS主机设置为https协议,您可以在响应头中看到Strict-Transport-Security: max-age=31536000 ;(我使用Firefox> Web Development> Network)。

但是当我查看firefox控制台时,看到一个错误消息:The site specified an invalid Strict-Transport-Security header.我还在spring config中手动将hsts标头设置为:

    <headers>
        <hsts />
    </headers>

生成相同的响应头,并且FireFox再次显示错误。

根据https://developer.mozilla.org/docs/Security/HTTP_Strict_Transport_Security,标题必须正确!

有任何评论吗?!

enter image description here

spring security firefox spring-security hsts
2个回答
1
投票
自签名证书似乎会产生此问题。

另请参阅:https://jira.spring.io/browse/SEC-3021


0
投票
您可以在Firefox地址栏中输入

about:config(确认显示信息,以确认信息消息)并搜索名为

security.enterprise_roots.enabled的首选项,然后双击并更改其值设置为true并重新启动firefox。

config firefox
© www.soinside.com 2019 - 2024. All rights reserved.