hf400159 commented on code in PR #8051:
URL: https://github.com/apache/apisix/pull/8051#discussion_r995365783
##########
docs/zh/latest/plugins/redirect.md:
##########
@@ -34,11 +34,11 @@ description: 本文介绍了关于 Apache APISIX `redirect` 插件的基本信
| 名称 | 类型 | 必选项 | 默认值 | 有效值 | 描述
|
|---------------------|---------------|-----|-------|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| http_to_https | boolean | 否 | false | [true,false] | 当设置为
`true` 并且请求是 HTTP 时,它将被重定向具有相同 URI 和 301 状态码的 HTTPS,原 URI 的查询字符串也将包含在 Location
头中。
|
-| uri | string | 否 | | | 要重定向到的
URI,可以包含 NGINX 变量。例如:`/test/index.htm`,
`$uri/index.html`,`${uri}/index.html`。如果你引入了一个不存在的变量,它不会报错,而是将其视为一个空变量。
|
+| http_to_https | boolean | 否 | false | [true,false] | 当设置为
`true` 并且请求是 HTTP 时,它将被重定向具有相同 URI 和 301 状态码的 HTTPS,原 URI 的查询字符串也将包含在 Location
头中。
|
+| uri | string | 否 | | | 要重定向到的
URI,可以包含 NGINX 变量。例如:`/test/index.htm`, `$uri/index.html`,`${uri}/index.html`,
`https://example.com/foo/bar` 。如果你引入了一个不存在的变量,它不会报错,而是将其视为一个空变量。
|
Review Comment:
```suggestion
| uri | string | 否 | | | 要重定向到的
URI,可以包含 NGINX
变量。例如:`/test/index.htm`,`$uri/index.html`,`${uri}/index.html`,`https://example.com/foo/bar`。如果你引入了一个不存在的变量,它不会报错,而是将其视为一个空变量。
|
```
##########
docs/en/latest/plugins/redirect.md:
##########
@@ -34,8 +34,8 @@ The `redirect` Plugin can be used to configure redirects.
| Name | Type | Required | Default | Valid values |
Description
|
|---------------------|---------------|----------|---------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| http_to_https | boolean | False | false | |
When set to `true` and the request is HTTP, it will be redirected to HTTPS with
the same URI with a 301 status code. Note the querystring from the raw URI
will also be contained in the Location header.
|
-| uri | string | False | | |
URI to redirect to. Can contain Nginx variables. For example,
`/test/index.html`, `$uri/index.html`, `${uri}/index.html`. If you refer to a
variable name that doesn't exist, instead of throwing an error, it will treat
it as an empty variable.
|
+| http_to_https | boolean | False | false | |
When set to `true` and the request is HTTP, it will be redirected to HTTPS with
the same URI with a 301 status code. Note the querystring from the raw URI
will also be contained in the Location header.
|
+| uri | string | False | | |
URI to redirect to. Can contain Nginx variables. For example,
`/test/index.html`, `$uri/index.html`, `${uri}/index.html`,
`https://example.com/foo/bar` . If you refer to a variable name that doesn't
exist, instead of throwing an error, it will treat it as an empty variable.
|
Review Comment:
```suggestion
| uri | string | False | | |
URI to redirect to. Can contain Nginx variables. For example,
`/test/index.html`, `$uri/index.html`, `${uri}/index.html`,
`https://example.com/foo/bar`. If you refer to a variable name that doesn't
exist, instead of throwing an error, it will treat it as an empty variable.
|
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]