jagerzhang opened a new issue #5551:
URL: https://github.com/apache/apisix/issues/5551


   ### Issue description
   
   类似issue:https://github.com/apache/apisix/issues/5399
   希望可以在路由高级参数匹配中支持下POST Body里面的参数匹配。目前我们是通过写serverless-pre来实现的,代码如下:
   ```
   function(vars)
       local core = require ('apisix.core')
       local body, err = core.request.get_body()
       if not body then
           return false
       end
     
       local data, err = core.json.decode(body)
       if not data then
           return false
       end
     
       -- 当匹配 body 里面 foo 字段等于 bar 的时候,路由生效
       if data['foo'] == 'bar' then
           return true
       end
     
       return false
     end
   ```
   
   希望可以直接支持下这个特性~~
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):
   - OS (cmd: `uname -a`):
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `curl 
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   - apisix-dashboard version, if have:
   - the plugin runner version, if the issue is about a plugin runner (cmd: 
depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `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