Skip to content

Commit

Permalink
Backport/net-5930/fix/rate limit config entry snake case (#19297)
Browse files Browse the repository at this point in the history
* fix: allow snake case keys for ip based rate limit config entry

* chore: add changelog
  • Loading branch information
JadhavPoonam committed Oct 20, 2023
1 parent 6a39ad2 commit bdcfbea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .changelog/_7406.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
server: **(Enterprise Only)** Fixed an issue where snake case keys were rejected when configuring the control-plane-request-limit config entry
```
8 changes: 4 additions & 4 deletions api/config_entry_rate_limit_ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package api

type ReadWriteRatesConfig struct {
ReadRate float64
WriteRate float64
ReadRate float64 `alias:"read_rate"`
WriteRate float64 `alias:"write_rate"`
}

type RateLimitIPConfigEntry struct {
Expand All @@ -16,8 +16,8 @@ type RateLimitIPConfigEntry struct {

Meta map[string]string `json:",omitempty"`
// overall limits
ReadRate float64
WriteRate float64
ReadRate float64 `alias:"read_rate"`
WriteRate float64 `alias:"write_rate"`

//limits specific to a type of call
ACL *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryACL OperationCategory = "ACL"
Expand Down

0 comments on commit bdcfbea

Please sign in to comment.