给一个域名提交了HSTS https://hstspreload.org/,但是就是无法通过,一直提示The HTTP page at http://domains.com sends an HSTS header. This has no effect over HTTP, and should be removed. 使用cloudflare CDN的话就正常,没有问题,如果使用自己的服务器需要修改NGINX的配置文件在nginx配置文件server前面添加map $scheme $hsts_header { https "max-age=63072000; includeSubDomains; preload"; } 然后在server内添加add_header Strict-Transport-Security $hsts_header; 把原本HSTS网站上要我们添加的add_header Strict-Transport-Security: max-age=63072000; includeSubDomains; preload 这一句给去掉即可重启n

生活 30 天前