Skip to content
New issue

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

Enable plugin to global_rules in 'Plugin List', dashboard will removed the _meta.filter setting when insert the plugin to ETCD. #2957

Open
FionJHYang opened this issue Jul 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@FionJHYang
Copy link

FionJHYang commented Jul 11, 2024

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

  1. Login Apisix Dashboard
  2. Click side menu 'Plugin'
  3. Click 'Enable' button to enable a plugin
  4. Select one plugin to enable and set _meta.filter config
  5. 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 -V or openresty -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

@FionJHYang FionJHYang added the bug Something isn't working label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant