Caelebs opened a new issue, #8953:
URL: https://github.com/apache/apisix/issues/8953

   ### Description
   
   I have a Java-provided service that forwards the request to the Apisix 
gateway, part of the code uses the `@PathVariable` annotations provided by 
`Spring`. 
   ```
   @RequestMapping("/getUserById/{userId}")
   public User getUserById(@PathVariable("userId") String userId){
        return userService.getUserById(userId);
   }
   ```
   when such a request arrives at the gateway, the url looks something like 
this: 
   ```
   /service/user/getUserById/602264ea4ad9ac6185e9924e3f616111:GET
   ```
   and I have a permission set for the user request that contains the path that 
the user can access. for requests like the one above, the URI path in the 
collection I get is in placeholder format.
   ```
   /service/user/getUserById/{userId}:GET
   ```
   I can use `ctx.var.request_uri` to get the request path to the gateway. I 
don't know how to tell if this request is included in the request with 
placeholder. and there may be more than one placeholder. what should I do in 
`lua ` code? 
   
   hope to get some advice.
   
   
   
   
   ### Environment
   
   - APISIX version (run `apisix version`): `2.6`
   - Operating system (run `uname -a`): `CentOS Linux release 7.9.2009 (Core)`
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): 
`openresty/1.19.3.1`
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`): `3.4.0`
   - APISIX Dashboard version, if relevant: `2.7.1`
   - Plugin runner version, for issues related to plugin runners: 
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to