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 2020/12/30 09:06:50 UTC

[GitHub] [apisix] 7error opened a new issue #3160: request help:

7error opened a new issue #3160:
URL: https://github.com/apache/apisix/issues/3160


   ### Issue description
   
   StripPrefix
   ```bash
   when StripPrefix=2
   curl http://127.0.0.1/user-service/a/user/1  -----> curl http://127.0.0.1:8080/user/1
   
   when StripPrefix=1
   curl http://127.0.0.1/user-service/a/user/1  -----> curl http://127.0.0.1:8080/a/user/1
   
   ref  https://cloud.spring.io/spring-cloud-gateway/reference/html/#the-stripprefix-gatewayfilter-factory
   ```
   PrefixPath is Reverse operation of StripPrefix
   ```bash
   when PrefixPath=/user
   curl http://127.0.0.1/1  ----->   curl http://localhost:9201/user/1  -->
   
   ref https://cloud.spring.io/spring-cloud-gateway/reference/html/#the-prefixpath-gatewayfilter-factory
   
   ```
   
   ### Environment
   
   * apisix version (cmd: `apisix version`):
   * OS: (cmd: `uname -a`)
   * OpenResty / Nginx version: (cmd: `nginx -V` or `openresty -V`)
   


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



[GitHub] [apisix] 7error edited a comment on issue #3160: request help: StripPrefix and PrefixPath

Posted by GitBox <gi...@apache.org>.
7error edited a comment on issue #3160:
URL: https://github.com/apache/apisix/issues/3160#issuecomment-752412071


   tks,I found this https://github.com/apache/apisix/blob/master/doc/getting-started.md#add-a-prefix-to-the-route, It seems a little clear,I will try 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:
users@infra.apache.org



[GitHub] [apisix] 7error closed issue #3160: request help: StripPrefix and PrefixPath

Posted by GitBox <gi...@apache.org>.
7error closed issue #3160:
URL: https://github.com/apache/apisix/issues/3160


   


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



[GitHub] [apisix] spacewander commented on issue #3160: request help: StripPrefix and PrefixPath

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #3160:
URL: https://github.com/apache/apisix/issues/3160#issuecomment-752401079


   You can use proxy-rewrite's regex_uri:
   https://github.com/apache/apisix/blob/master/doc/plugins/proxy-rewrite.md#attributes


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



[GitHub] [apisix] 7error commented on issue #3160: request help: StripPrefix and PrefixPath

Posted by GitBox <gi...@apache.org>.
7error commented on issue #3160:
URL: https://github.com/apache/apisix/issues/3160#issuecomment-752412071


   tks,I found this `https://github.com/apache/apisix/blob/master/doc/getting-started.md#add-a-prefix-to-the-route`, It seems a little clear,I will try 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:
users@infra.apache.org