首页 > npm 使用 http 和 https 的源有安全性的区别吗?

npm 使用 http 和 https 的源有安全性的区别吗?

  npm ---- https://registry.npmjs.org/
  cnpm --- http://r.cnpmjs.org/
  taobao - http://registry.npm.taobao.org/
  eu ----- http://registry.npmjs.eu/
  au ----- http://registry.npmjs.org.au/
  sl ----- http://npm.strongloop.com/
  nj ----- https://registry.nodejitsu.com/

有些源是 https 的会比 http 的更安全?不会下载到含有恶意代码的包?


https 当然比 http 安全一些。

虽然我没听说过有劫持 npm 源进行攻击的案例,但是如果有的话,危害确实很大。

另一个原因是,https 真的已经非常普及,几乎成为稍有名气的产品或服务的标配了。所以即使 http 暂时也没出什么问题,加上 ssl 也不是很麻烦的事情就顺便加了呗。

【热门文章】
【热门文章】