apisix-dashboard: bug: Setting rejected_msg in "limit-req" plugin does not save

Issue description

Setting rejected_msg in “limit-req” plugin does not save

Environment

  • apisix version (cmd: apisix version):2.12
  • OS (cmd: uname -a):Linux wx-2 3.10.0-1160.el7.x86_64

Steps to reproduce

1.Set rejected_msg in “limit-req” plugin , eg: { “rate”: 1, “burst”: 1, “key_type”: “var”, “key”: “1”, “rejected_code”: 503, “nodelay”: false, “rejected_msg”:“请求太多了,稍后重试…” } 2. After saving, go in and check again, and find that it is not saved, eg: { “rate”: 1, “burst”: 1, “key_type”: “var”, “key”: “1”, “rejected_code”: 503, “nodelay”: false }

Actual result

{ “rate”: 1, “burst”: 1, “key_type”: “var”, “key”: “1”, “rejected_code”: 503, “nodelay”: false }

Error log

nothing

Expected result

{ “rate”: 1, “burst”: 1, “key_type”: “var”, “key”: “1”, “rejected_code”: 503, “nodelay”: false, “rejected_msg”:“请求太多了,稍后重试…” }

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (12 by maintainers)

Most upvoted comments

@1657486787 I checked this issue, due to rejected_msg is not supported on the front-end form, it is not displayed, but there is already data in etcd. We should support this filed in front, @guoqqqi please take a look. image

The PR related to this issue has been merged. I think this issue can be closed.

Can you post the full configuration of this route in etcd? That way I can verify it directly.

the configuration is: { “uri”: “/dw2/*”, “name”: “route_limit_req”, “methods”: [ “GET” ], “plugins”: { “ext-plugin-pre-req”: { “conf”: [ { “name”: “TokenValidator”, “value”: “{“validate_header”:“token”,“validate_url”:“434”,“rejected_code”:“406”}” } ], “disable”: true }, “limit-req”: { “burst”: 1, “disable”: false, “key”: “1”, “key_type”: “var”, “nodelay”: false, “rate”: 1, “rejected_code”: 503, “rejected_msg”: “请求太多了,稍后重试…” }, “request-id”: { “disable”: true, “header_name”: “mk-id”, “include_in_response”: true }, “response-rewrite”: { “body_base64”: false, “disable”: true, “headers”: { “X-Server-balancer_addr”: “$balancer_ip:$balancer_port”, “X-Server-id”: 3, “X-Server-status”: “on”, “body”: “{“code”:“ok”,“message”:“new json body”}” }, “vars”: [ [ “status”, “==”, 200 ] ] } }, “upstream_id”: “392266237876372160”, “status”: 1 }

1.Set rejected_msg in “limit-req” plugin , eg: image

  1. After saving, go in and check again, and find that it is not saved, eg: image

What’s the dashboard version?