该站点指定了无效的Strict-Transport-Security标头 - firebug

时间:2015-02-06 13:53:22

标签: apache .htaccess http-headers firebug

添加HSTS标题时,我在firebug中收到此警告。

The site specified an invalid Strict-Transport-Security header.

这是我的htaccess

<IfModule mod_headers.c>
    Header append X-FRAME-OPTIONS: SAMEORIGIN
    Header append Strict-Transport-Security: 'max-age=31536000; includeSubDomains'
</IfModule>

当我从值Internal Server Error中删除引号时。 网站通过https提供,从http重定向到https是从apache的站点文件设置的。如果重要,SSL证书是自签名的。

启用了mod标头。我在debian 7,apache 2.2。

由于

1 个答案:

答案 0 :(得分:9)

正如@jhutar在评论中提到的那样,在我的情况下,当我在主域上使用受信任的SSL证书设置网站时,问题就消失了。因此,firebug仅针对自签名(和/或不可信)SSL证书显示该错误。