从网络服务器强制重置 HTST 缓存

Force HTST cache reset from webserver

我正在使用 nginx 作为反向代理并使用 nodejs 作为应用程序。我想知道是否有任何解决方案可以从网络服务器强制 HSTS 或 HTTPS 严格传输安全?

我不想要求用户重置他们的浏览器缓存,因为这确实是技术性的,他们不知道如何解决这个问题。

您可以使用max-age = 0重置缓存并强制重置HTST缓存。

在 nginx 中:

server {
   ...
   add_header  Strict-Transport-Security "max-age=0;";
   ...
}