This is an automated email from the ASF dual-hosted git repository.
monkeydluffy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new a058e7212 docs: update desc for `proxy-rewrite` plugin to not set
`Host` with `headers.set` (#10717)
a058e7212 is described below
commit a058e72124bd33c4f103ddfc4076da1798536f6c
Author: Traky Deng <[email protected]>
AuthorDate: Tue Dec 26 19:12:47 2023 -0800
docs: update desc for `proxy-rewrite` plugin to not set `Host` with
`headers.set` (#10717)
---
docs/en/latest/plugins/proxy-rewrite.md | 2 +-
docs/zh/latest/plugins/proxy-rewrite.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/en/latest/plugins/proxy-rewrite.md
b/docs/en/latest/plugins/proxy-rewrite.md
index d1b4fdca2..ffee1440a 100644
--- a/docs/en/latest/plugins/proxy-rewrite.md
+++ b/docs/en/latest/plugins/proxy-rewrite.md
@@ -42,7 +42,7 @@ The `proxy-rewrite` Plugin rewrites Upstream proxy
information such as `scheme`,
| host | string | False | |
| New Upstream host address.
[...]
| headers | object | False | |
| |
| headers.add | object | false | | | Append
the new headers. The format is `{"name": "value",...}`. The values in the
header can contain Nginx variables like `$remote_addr` and `$balancer_ip`. It
also supports referencing the match result of `regex_uri` as a variable like
`$1-$2-$3`.
|
-| headers.set | object | false | | | Overwrite
the headers. If the header does not exist, it will be added. The format is
`{"name": "value", ...}`. The values in the header can contain Nginx variables
like `$remote_addr` and `$balancer_ip`. It also supports referencing the match
result of `regex_uri` as a variable like `$1-$2-$3`.
|
+| headers.set | object | false | | | Overwrite
the headers. If the header does not exist, it will be added. The format is
`{"name": "value", ...}`. The values in the header can contain Nginx variables
like `$remote_addr` and `$balancer_ip`. It also supports referencing the match
result of `regex_uri` as a variable like `$1-$2-$3`. Note that if you would
like to set the `Host` header, use the `host` attribute instead.
[...]
| headers.remove | array | false | | | Remove
the headers. The format is `["name", ...]`.
| use_real_request_uri_unsafe | boolean | False | false |
| Use real_request_uri (original
$request_uri in nginx) to bypass URI normalization. **Enabling this is
considered unsafe as it bypasses all URI normalization steps**.
[...]
diff --git a/docs/zh/latest/plugins/proxy-rewrite.md
b/docs/zh/latest/plugins/proxy-rewrite.md
index e8b96b186..8d16466ce 100644
--- a/docs/zh/latest/plugins/proxy-rewrite.md
+++ b/docs/zh/latest/plugins/proxy-rewrite.md
@@ -42,7 +42,7 @@ description: 本文介绍了关于 Apache APISIX `proxy-rewrite` 插件的基本
| host | string | 否 | | | 转发到上游的新
`host` 地址,例如:`iresty.com`。|
| headers | object | 否 | | | |
| headers.add | object | 否 | | |
添加新的请求头,如果头已经存在,会追加到末尾。格式为 `{"name": "value", ...}`。这个值能够以 `$var` 的格式包含 NGINX
变量,比如 `$remote_addr $balancer_ip`。也支持以变量的形式引用 `regex_uri` 的匹配结果,比如 `$1-$2-$3`。
|
-| headers.set | object | 否 | | |
改写请求头,如果请求头不存在,则会添加这个请求头。格式为 `{"name": "value", ...}`。这个值能够以 `$var` 的格式包含 NGINX
变量,比如 `$remote_addr $balancer_ip`。也支持以变量的形式引用 `regex_uri` 的匹配结果,比如 `$1-$2-$3`。
|
+| headers.set | object | 否 | | |
改写请求头,如果请求头不存在,则会添加这个请求头。格式为 `{"name": "value", ...}`。这个值能够以 `$var` 的格式包含 NGINX
变量,比如 `$remote_addr $balancer_ip`。也支持以变量的形式引用 `regex_uri` 的匹配结果,比如
`$1-$2-$3`。请注意,若想设置 `Host` 请求头,应使用 `host` 属性。
|
| headers.remove | array | 否 | | | 移除请求头。格式为
`["name", ...]`。|
| use_real_request_uri_unsafe | boolean | 否 | false |
| 使用 real_request_uri(nginx 中的原始 $request_uri)绕过 URI 规范化。启用它被认为是不安全的,因为它会绕过所有
URI 规范化步骤。|