You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by GitBox <gi...@apache.org> on 2021/09/28 08:03:08 UTC

[GitHub] [incubator-shenyu] ichenhe edited a comment on issue #2162: [BUG] Rule matching does not take rewritten uri into account

ichenhe edited a comment on issue #2162:
URL: https://github.com/apache/incubator-shenyu/issues/2162#issuecomment-928948775


   > `/users/hello` have some error?
   
   @yu199195 no. The backend did not receive the request at all. Shenyu also did not trigger access (I confirmed this through debug.).
   
   There's another evidence:
   
   1. Add a selector to Rewrite plugin: uri == `/users/hello/123`.
   2. Add a rule to Rewrite plugin: uri == `/users/hello/123`, regex: `.+`, replace: `/users/hello`
   3. Get `/users/hello/123` --> OK
   
   This means that url rewriting is invalid for matching, valid only for [the actual processing of the plugin](https://github.com/apache/incubator-shenyu/blob/c69d8d84a0c64eb5115249d6da8edfc37837a0c8/shenyu-plugin/shenyu-plugin-springcloud/src/main/java/org/apache/shenyu/plugin/springcloud/SpringCloudPlugin.java#L136).
   
   > At the same time, uri rewriting is not transparent to plugins, all plugins need to handle this situation manually. I don't think that's a good idea.


-- 
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@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org