技术宅改变世界 技术宅改变世界

HTTPS 优化概括

in Dev read (1202) 文章转载请注明来源!

1、开启 https

2、开启 http2(支持 ALPN)

  • 一般需要 openssl1.0.2 以上版本(nginx 下,大部分需要自己编译)

    3、使用 ecc 证书

  • ecc 证书不兼容 xp,想兼容必须启动双证书,双证书需要 nginx1.11 + 以上版本支持。
  • https://imququ.com/post/ecc-certificate.html

    4、开启 OCSP

    5、开启 HSTS, 并加入预加载列表

  • 协议头:strict-transport-security
  • https://hstspreload.org/

    5、将网页中 http 链接转化为 https

  • 协议头:Upgrade-Insecure-Requests

    6、移动端启用 chacha20 算法

    7、使用 cdn 或外部资源推荐配置 integrity。

    8、配置 Content-Security-Policy 避免 xss

    具体优化方法可以自行搜索,这里只做一个概括,持续更新中。

httpshttp2ocsp
发表新评论
博客已萌萌哒运行
© 2024 • Powered by Typecho • Theme for yotu
PREVIOUS NEXT
雷姆
拉姆