nginx是否支持将请求压缩到上游?

剂量nginx支持吗?
你能告诉我一些配置吗?

[Client]           [Nginx Reverse Proxy]               [BackEnd]
   |   [Raw Post]         |    [gzip encoded request]     |   
   |--------------------> | ----------------------------->|
   |                      |                               |  
   |   [Raw Response]     |    [gzip encoded response]    |
   | <------------------  | <-----------------------------|
   |                      |                               |

显然有一些方法可以做到这一点. Nginx有一个gunzip模块,gzip解压缩响应:

The ngx_http_gunzip_module module is a filter that decompresses
responses with “Content-Encoding: gzip” for clients that do not
support “gzip” encoding method. The module will be useful when it is
desirable to store data compressed,to save space and reduce I/O
costs.

This module is not built by default,it should be enabled with the
–with-http_gunzip_module configuration parameter.

资料来源:http://nginx.org/en/docs/http/ngx_http_gunzip_module.html

然后你就可以使用它:

gunzip on;

希望对你有用.

另见这个问题:
Is there sort of unzip modules in nginx?

dawei

【声明】:淮南站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。