diff --git a/plugins/http/schemas.go b/plugins/http/schemas.go index ae4b0d0b..ef019ee8 100644 --- a/plugins/http/schemas.go +++ b/plugins/http/schemas.go @@ -159,11 +159,11 @@ func rateLimitMiddlewareSchema() *schema.ModuleSchema { Inputs: []schema.ServiceIODef{{Name: "request", Type: "http.Request", Description: "HTTP request to rate-limit"}}, Outputs: []schema.ServiceIODef{{Name: "limited", Type: "http.Request", Description: "HTTP request (passed through if within limit)"}}, ConfigFields: []schema.ConfigFieldDef{ - {Key: "requestsPerMinute", Label: "Requests Per Minute", Type: schema.FieldTypeNumber, DefaultValue: 60, Description: "Maximum number of requests per minute per client (mutually exclusive with requestsPerHour)"}, + {Key: "requestsPerMinute", Label: "Requests Per Minute", Type: schema.FieldTypeNumber, DefaultValue: 60, Description: "Maximum number of requests per minute per client; used when requestsPerHour is not set"}, {Key: "requestsPerHour", Label: "Requests Per Hour", Type: schema.FieldTypeNumber, DefaultValue: 0, Description: "Maximum number of requests per hour per client; takes precedence over requestsPerMinute when set"}, {Key: "burstSize", Label: "Burst Size", Type: schema.FieldTypeNumber, DefaultValue: 10, Description: "Maximum burst of requests allowed above the rate limit"}, }, - DefaultConfig: map[string]any{"requestsPerMinute": 60, "burstSize": 10}, + DefaultConfig: map[string]any{"requestsPerMinute": 60, "requestsPerHour": 0, "burstSize": 10}, } }