membphis commented on a change in pull request #979: feature: support regex_uri option in proxy-rewrite plugin URL: https://github.com/apache/incubator-apisix/pull/979#discussion_r361355328
########## File path: doc/plugins/proxy-rewrite.md ########## @@ -35,6 +35,7 @@ upstream proxy info rewrite plugin. |------- |-----|------| |scheme |optional| Upstream new `schema` forwarding protocol,options can be `http` or `https`,default `http`.| |uri |optional| Upstream new `uri` forwarding address.| +|regex_uri |optional| Upstream new `uri` forwarding address. Use regular expression to match uri from client, when the match is successful, the uri template will be forwarded upstream. If the match is not successful, the uri from the client will be forwarded to the upstream. When `uri` and` regex_uri` are both exist, `uri` is used first. For example: [" ^/iresty/(.*)/(.*)/(.*)", "/$1-$2-$3"], the first element represents the matching regular expression and the second element represents the uri template that is forwarded to the upstream.| Review comment: > If the match is not successful, the uri from the client will be forwarded to the upstream. If the match fails, is it expected to continue using the original request uri? What do you think of this? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services