加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 运营中心 > Nginx > 正文

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

发布时间:2020-12-13 21:00:53 所属栏目:Nginx 来源:网络整理
导读:剂量nginx支持吗? 你能告诉我一些配置吗? [Client] [Nginx Reverse Proxy] [BackEnd] | [Raw Post] | [gzip encoded request] | |-------------------- | -----------------------------| | | | | [Raw Response] | [gzip encoded response] | | 显然有一

剂量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?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读