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 2021/07/02 06:37:18 UTC

[GitHub] [apisix] nanamikon opened a new issue #4519: request help: How to deal with arg with dash in the plugin's setting

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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] nanamikon commented on issue #4519: request help: How to deal with arg with dash in the plugin's setting

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


   get it,  I will submit a pr


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

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



[GitHub] [apisix] nanamikon commented on issue #4519: request help: How to deal with arg with dash in the plugin's setting

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


   get it,  I will submit a pr


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

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



[GitHub] [apisix] tzssangglass closed issue #4519: request help: How to deal with arg with dash in the plugin's setting

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


   


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

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



[GitHub] [apisix] spacewander commented on issue #4519: request help: How to deal with arg with dash in the plugin's setting

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


   We can do the same trick like https://github.com/apache/apisix/blob/38785557bee818c3d8a3ca1d46f788fc65ab38ab/apisix/core/ctx.lua#L151
   
   PR is welcome!


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

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