这是因为在nginx配置中可能存在多个server块,其中有些没有启用https,所以在这些server块中会出现Strict-Transport-Security "max-age=0"的情况。建议在只有启用https的server块中添加Strict-Transport-Security头信息,以避免出现重复的情况。

nginx的http块里 增加了add_header Strict-Transport-Security max-age=31536000; includeSubDomains always但是在response headers中同时出现了Strict-Transport-Security max-age=0、Strict-Transport-Security max-age=31536000;

原文地址: https://www.cveoy.top/t/topic/fuIn 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录