apisix-dashboard
apisix-dashboard copied to clipboard
Enable plugin to global_rules in 'Plugin List', dashboard will removed the _meta.filter setting when insert the plugin to ETCD.
Issue description
Enable plugin to global_rules in 'Plugin List', dashboard will removed the _meta.filter setting when insert the plugin to ETCD.
if I want insert the request-validation plugin like below setting:
{ "_meta": { "disable": true, "filter": [ [ "host", "~=", "test.com.tw" ] ] }, "header_schema": { "properties": { "Origin": { "type": "string" } }, "required": [ "Origin" ], "type": "object" } }
After click submit button, the data in ETCD will remove filter section like below:
{ "_meta": { "disable": true }, "header_schema": { "properties": { "Origin": { "type": "string" } }, "required": [ "Origin" ], "type": "object" } }
Expected behavior
The data in ETCD should look like this:
{ "_meta": { "disable": true, "filter": [ [ "host", "~=", "test.com.tw" ] ] }, "header_schema": { "properties": { "Origin": { "type": "string" } }, "required": [ "Origin" ], "type": "object" } }
How to Reproduce
- Login Apisix Dashboard
- Click side menu 'Plugin'
- Click 'Enable' button to enable a plugin
- Select one plugin to enable and set _meta.filter config
- Click submit to finish enable
Screenshots
No response
Environment
- apisix version (cmd:
apisix version): 3.8.0 - OS (cmd:
uname -a): - OpenResty / Nginx version (cmd:
nginx -Voropenresty -V): - etcd version, if have (cmd: run
etcd --version): 3.5.10 - apisix-dashboard version, if have: 3.0.0
- Browser version, if have:
Additional context
No response