nanamikon opened a new issue #4519:
URL: https://github.com/apache/apisix/issues/4519


   ### Issue description
   Some plugins support vars matching, such as traffic-split.   
   ```
   "plugins": {
           "traffic-split": {
               "rules": [
                   {
                       "match": [
                           {
                               "vars": [
                                   ["arg_name","==","test"]
                               ]
                           }
                       ],
                       "weighted_upstreams": [
                           {
                               "upstream": {
                                   "name": "upstream_A",
                                   "type": "roundrobin",
                                   "nodes": {
                                       "127.0.0.1:1981":10
                                   }
                               }
                           }
                       ]
                   }
               ]
           }
       }
   ```
   
   If I want to check an arg with dash (ex:  test-name),  I have to  get this 
arg using regex from nginx.var.args refer to 
https://marc.info/?l=nginx&m=141589036701879&w=2.      
   
   So how to match this type of args in the plugin setting ?  I can't get any 
tips from  https://github.com/api7/lua-resty-expr#operator-list
   
   Thank you
   
   ### Environment
   
   Request help without environment information will be ignored or closed.
   
   * 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:
   * 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