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

前端之家收集整理的这篇文章主要介绍了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?

原文链接:https://www.f2er.com/nginx/434791.html

猜你在找的Nginx相关文章