Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
Request help without environment information will be ignored or closed.
apisix version
uname -a
nginx -V
openresty -V
curl http://127.0.0.1:9090/v1/server_info
luarocks --version
The text was updated successfully, but these errors were encountered:
We can do the same trick like
apisix/apisix/core/ctx.lua
Line 151 in 3878555
PR is welcome!
get it, I will submit a pr
Successfully merging a pull request may close this issue.
Issue description
Some plugins support vars matching, such as traffic-split.
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):uname -a):nginx -Voropenresty -V):curl http://127.0.0.1:9090/v1/server_infoto get the info from server-info API):luarocks --version):The text was updated successfully, but these errors were encountered: