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 2019/12/16 15:06:40 UTC

[GitHub] [incubator-apisix] agile6v opened a new pull request #979: feature: support regex_uri option in proxy-rewrite plugin

agile6v opened a new pull request #979: feature: support regex_uri option in proxy-rewrite plugin
URL: https://github.com/apache/incubator-apisix/pull/979
 
 
    ### Summary
   
   Support more flexible URI rewriting in proxy-rewrite plugin. 
   
   Using regex_uri option to support regex matching. Its type is array, the first element is the matching pattern, and the second element is the final target. If the match is successful, the final target will be used as the URI that is forwarded to the upstream.
   
   For example:
   
   ```shell
   {
       "methods": ["GET"],
       "uri": "/abc/def/*",
       "plugins": {
           "proxy-rewrite": {
               "regex_uri": ["^/abc/def/(.*)", "/$1"]
           }
       },
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "127.0.0.1:80": 1
           }
       }
   }
   ```
   
   ### Issues resolved
   
   Fix #949 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services