gpt4 book ai didi

apache - 在 Apache 服务器上取消设置或过期 HSTS 策略

转载 作者:行者123 更新时间:2023-12-03 23:42:51 24 4
gpt4 key购买 nike

我在服务器上的 ssl vhost 中设置了这一行。我正在运行 Apache 2.x

Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"

这是一个重大错误,因为现在我想删除它并强制用户返回 http页有时。它没有启用很长时间,但我不想失去任何人。如果我现在尝试强制用户返回 http 页面,他们最终会进入重定向循环。

如何使用服务器上的设置取消或过期 HSTS,以便当用户访问该站点并点击 https该站点的版本中,Strict-Transport-Security 设置已从他们的浏览器中删除,并且他们能够被重定向到 http ?

我已经知道我犯了一个愚蠢的错误。我吸取了教训,现在只需要清理它。

最佳答案

弄清楚了:

NOTE: A max-age value of zero (i.e., "max-age=0") signals the UA to cease regarding the host as a Known HSTS Host, including the includeSubDomains directive (if asserted for that HSTS Host). See also Section 8.1 ("Strict-Transport-Security Response Header Field Processing").



来自 RFC 6797文档。

因此,我将只设置以下行并将其保留几个月,然后再将其删除。
Header always set Strict-Transport-Security "max-age=0; includeSubDomains"

关于apache - 在 Apache 服务器上取消设置或过期 HSTS 策略,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21766910/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com