Skip to content

Commit bdcfbea

Browse files
authored
Backport/net-5930/fix/rate limit config entry snake case (#19297)
* fix: allow snake case keys for ip based rate limit config entry * chore: add changelog
1 parent 6a39ad2 commit bdcfbea

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.changelog/_7406.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
server: **(Enterprise Only)** Fixed an issue where snake case keys were rejected when configuring the control-plane-request-limit config entry
3+
```

api/config_entry_rate_limit_ip.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
package api
55

66
type ReadWriteRatesConfig struct {
7-
ReadRate float64
8-
WriteRate float64
7+
ReadRate float64 `alias:"read_rate"`
8+
WriteRate float64 `alias:"write_rate"`
99
}
1010

1111
type RateLimitIPConfigEntry struct {
@@ -16,8 +16,8 @@ type RateLimitIPConfigEntry struct {
1616

1717
Meta map[string]string `json:",omitempty"`
1818
// overall limits
19-
ReadRate float64
20-
WriteRate float64
19+
ReadRate float64 `alias:"read_rate"`
20+
WriteRate float64 `alias:"write_rate"`
2121

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

0 commit comments

Comments
 (0)