spacewander commented on code in PR #7065:
URL: https://github.com/apache/apisix/pull/7065#discussion_r874860925


##########
docs/zh/latest/plugins/redirect.md:
##########
@@ -45,7 +45,10 @@ description: 本文介绍了关于 Apache APISIX `redirect` 插件的基本信
 
 `http_to_https`、`uri` 和 `regex_uri` 只能配置其中一个属性。
 
-* 当开启 `http_to_https` 时,重定向 URL 中的端口将是 `X-Forwarded-Port` 请求头的值或服务器的端口。
+* 当开启 `http_to_https` 时,重定向 URL 中的端口将按如下顺序选取一个值(按优先级从高到低排列)
+  * 从配置文件(`conf/config.yaml`)中读取 `plugin_attr.redirect_https_port`。

Review Comment:
   ditto



##########
docs/en/latest/plugins/redirect.md:
##########
@@ -45,7 +45,10 @@ The `redirect` Plugin can be used to configure redirects.
 
 Only one of `http_to_https`, `uri` and `regex_uri` can be configured.
 
-* When enabling `http_to_https`, the port in the redirect URL will be the 
value of header `X-Forwarded-Port` or the port of the server.
+* When enabling `http_to_https`, the ports in the redirect URL will pick a 
value in the following order (in descending order of priority)
+  * Read `plugin_attr.redirect_https_port` from the configuration file 
(`conf/config.yaml`).

Review Comment:
   redirect_https_port should be updated



##########
t/plugin/redirect.t:
##########
@@ -428,59 +428,83 @@ passed
 
 
 
-=== TEST 18: redirect
+=== TEST 18: redirect(port using `plugin_attr.redirect_https_port`)

Review Comment:
   ditto



-- 
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]

Reply via email to