Skip to content

Commit

Permalink
docs: update the gzip plugin documentation (#10632)
Browse files Browse the repository at this point in the history
  • Loading branch information
luoluoyuyu authored Dec 12, 2023
1 parent 919427b commit 986f356
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/en/latest/plugins/gzip.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ description: This document contains information about the Apache APISIX gzip Plu
## Description

The `gzip` Plugin dynamically sets the behavior of [gzip in Nginx](https://docs.nginx.com/nginx/admin-guide/web-server/compression/).
When the `gzip` plugin is enabled, the client needs to include `Accept-Encoding: gzip` in the request header to indicate support for gzip compression. Upon receiving the request, APISIX dynamically determines whether to compress the response content based on the client's support and server configuration. If the conditions are met, `APISIX` adds the `Content-Encoding: gzip` header to the response, indicating that the response content has been compressed using gzip. Upon receiving the response, the client uses the corresponding decompression algorithm based on the `Content-Encoding` header to decompress the response content and obtain the original response content.

:::info IMPORTANT

Expand Down
3 changes: 2 additions & 1 deletion docs/zh/latest/plugins/gzip.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ description: 本文介绍了关于 Apache APISIX `gzip` 插件的基本信息及

## 描述

`gzip` 插件能动态设置 NGINX 的压缩行为。
`gzip` 插件能动态设置 [NGINX](https://docs.nginx.com/nginx/admin-guide/web-server/compression/) 的压缩行为。
当启用 `gzip` 插件时,客户端在发起请求时需要在请求头中添加 `Accept-Encoding: gzip`,以表明客户端支持 `gzip` 压缩。APISIX 在接收到请求后,会根据客户端的支持情况和服务器配置动态判断是否对响应内容进行 gzip 压缩。如果判定条件得到满足,APISIX 将在响应头中添加 `Content-Encoding: gzip` 字段,以指示响应内容已经通过 `gzip` 压缩。在客户端接收到响应后,根据响应头中的 `Content-Encoding` 字段使用相应的解压缩算法对响应内容进行解压,从而获取原始的响应内容。

:::info IMPORTANT

Expand Down

0 comments on commit 986f356

Please sign in to comment.