Open 840963657 opened 1 year ago
Could u pls provide more accurate information?
1、create route, add vars in route,operator use '!',like this: { "uri": "/", "name": "test", "methods": [ "GET" ], "vars": [ [ "http_test1", "!", "123" ] ], ....... 2、view apisix's error.log file: 2022/12/08 10:57:25 [error] 6804#6804: 2355864 [lua] config_etcd.lua:573: failed to fetch data from etcd: failed to check item data of [/apisix/routes] err:failed to validate the 'vars' expression: invalid operator '!', etcd key: /apisix/routes, context: ngx.timer
Hi @840963657, can you help with the specific steps to create this route using the dashboard? Also, you can try the latest version of the dashboard.
1、create route, add vars in route,operator use '!',like this: { "uri": "/", "name": "test", "methods": [ "GET" ], "vars": [ [ "http_test1", "!", "123" ] ], ....... 2、view apisix's error.log file: 2022/12/08 10:57:25 [error] 6804#6804: 2355864 [lua] config_etcd.lua:573: failed to fetch data from etcd: failed to check item data of [/apisix/routes] err:failed to validate the 'vars' expression: invalid operator '!', etcd key: /apisix/routes, context: ngx.timer
Unable to create this configuration via the UI, are you using the raw data editor?
Issue description
apisix not support '!' operator . apisix error log: 2022/12/08 10:57:25 [error] 6804#6804: *2355864 [lua] config_etcd.lua:573: failed to fetch data from etcd: failed to check item data of [/apisix/routes] err:failed to validate the 'vars' expression: invalid operator '!', etcd key: /apisix/routes, context: ngx.timer
Expected behavior
When create route, dashboard should not support '!' in vars.
How to Reproduce
Screenshots
![Uploading image.png…]() ![Uploading image.png…]()
Environment
apisix version
): 2.13uname -a
): Linux localhost.localdomain 3.10.0-1062.18.1.el7.x86_64 #1 SMP Tue Mar 17 23:49:17 UTC 2020 x86_64 x86_64 x86_64 GNU/Linuxnginx -V
oropenresty -V
): nginx version: openresty/1.19.9.1etcd --version
): etcd Version: 3.4.13Additional context
lua-resty-expr https://github.com/api7/lua-resty-expr/blob/main/lib/resty/expr/v1.lua lua-resty-expr don't support this operator '!'