You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/05/18 01:14:10 UTC
[GitHub] [apisix] tokers commented on a diff in pull request #7065: fix: redirect http to https but port not change
tokers commented on code in PR #7065:
URL: https://github.com/apache/apisix/pull/7065#discussion_r875387274
##########
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`).
+ * If `apisix.ssl` is enabling, read `apisix.ssl.listen_port` first, and if it does not exist, read `apisix.ssl.listen` and select a random port from it.
Review Comment:
```suggestion
* If `apisix.ssl` is enabled, read `apisix.ssl.listen_port` first, and if it does not exist, read `apisix.ssl.listen` and select a port randomly from it.
```
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org