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

fix: allow snake case keys for ip based rate limit config entry #19277

Merged
merged 2 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading