Node.js: Gzip compression?

前端 未结 13 1440
迷失自我
迷失自我 2020-11-30 21:57

Am I wrong in finding that Node.js does no gzip compression and there are no modules out there to perform gzip compression? How can anyone use a web server that has no compr

13条回答
  •  孤独总比滥情好
    2020-11-30 22:35

    Generally speaking, for a production web application, you will want to put your node.js app behind a lightweight reverse proxy such as nginx or lighttpd. Among the many benefits of this setup, you can configure the reverse proxy to do http compression or even tls compression, without having to change your application source code.

提交回复
热议问题