这种情况可能是因为在 nginx 的配置文件中,有多个 server 块或者 location 块,这些块中都添加了 'Strict-Transport-Security' 头部信息,但是它们的 max-age 和 includeSubDomains 参数不一致,导致在 response headers 中出现了多个 'Strict-Transport-Security' 头部信息。

解决方法是在所有的 server 块或者 location 块中保持一致的 'Strict-Transport-Security' 头部信息,确保它们的 max-age 和 includeSubDomains 参数一致即可。如果需要更改 'Strict-Transport-Security' 头部信息,需要在所有的块中进行修改。

Nginx 配置中 Strict-Transport-Security 头部信息冲突问题及解决方法

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

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