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/03/23 03:51:52 UTC

[GitHub] [apisix] kwanhur commented on pull request #6686: feat(plugin-redirect): set redirect server port when enable http_to_https

kwanhur commented on pull request #6686:
URL: https://github.com/apache/apisix/pull/6686#issuecomment-1075886567


   From plugin redirect docs, [rule 1](https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/redirect.md)
   > Only one of `http_to_https`, `uri` or `regex_uri` can be specified.
   
   1. Under `uri` mode, it had supported to specify redirect port or host, like [test case 15-16](https://github.com/apache/apisix/blob/master/t/plugin/redirect.t#L346-L394).
   
       - specify redirect port just update plugin's uri like(the other field is also the same solution)
   ```shell
    "plugins": {
           "redirect": {
           "uri": "https://$host:9443$request_uri",
           "ret_code": 301
        }
   }
   ```
   
   2. Under `http_to_https` mode, extend `uri` field, it seems to break the rule 1 and bring a big change.
   
   To extend the other field, what about new attribute `location`?
   - If empty, its default value `https://$host$request_uri`.
   - If not empty, it goes to the same with `uri`.


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