From dba8d6721ef6daf55d2c7a9292f37c9b548ea3af Mon Sep 17 00:00:00 2001 From: "Chris S. Kim" Date: Wed, 25 Oct 2023 10:40:41 -0400 Subject: [PATCH] Add clarification for route match behavior --- agent/structs/config_entry.go | 1 + api/config_entry.go | 1 + .../content/docs/connect/config-entries/service-defaults.mdx | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/agent/structs/config_entry.go b/agent/structs/config_entry.go index a844a9de85..544820f4d6 100644 --- a/agent/structs/config_entry.go +++ b/agent/structs/config_entry.go @@ -418,6 +418,7 @@ type InstanceLevelRateLimits struct { RequestsMaxBurst int `alias:"requests_max_burst"` // Routes is a list of rate limits applied to specific routes. + // For a given request, the first matching route will be applied, if any. // Overrides any top-level configuration. Routes []InstanceLevelRouteRateLimits } diff --git a/api/config_entry.go b/api/config_entry.go index b59c20fd30..ffc18a85ed 100644 --- a/api/config_entry.go +++ b/api/config_entry.go @@ -341,6 +341,7 @@ type InstanceLevelRateLimits struct { RequestsMaxBurst int `alias:"requests_max_burst"` // Routes is a list of rate limits applied to specific routes. + // For a given request, the first matching route will be applied, if any // Overrides any top-level configuration. Routes []InstanceLevelRouteRateLimits } diff --git a/website/content/docs/connect/config-entries/service-defaults.mdx b/website/content/docs/connect/config-entries/service-defaults.mdx index b7b128a435..5d44b0afa8 100644 --- a/website/content/docs/connect/config-entries/service-defaults.mdx +++ b/website/content/docs/connect/config-entries/service-defaults.mdx @@ -649,7 +649,7 @@ Specifies a list of rate limiting configurations to apply to specific routes to - `PathPrefix` - `PathRegex` -Refer to [Examples](#enable-request-rate-limit-on-a-prefixed-path) for example configurations. +For a given request, the first matching route will be applied, if any. Refer to [Examples](#enable-request-rate-limit-on-a-prefixed-path) for example configurations. #### Values