Browse Source

Backport of Add clarification for route match behavior into release/1.17.x (#19368)

* backport of commit dba8d6721e

* backport of commit 436cc19464

---------

Co-authored-by: Chris S. Kim <ckim@hashicorp.com>
pull/19371/head
hc-github-team-consul-core 1 year ago committed by GitHub
parent
commit
54ee2b633e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      agent/structs/config_entry.go
  2. 1
      api/config_entry.go
  3. 2
      website/content/docs/connect/config-entries/service-defaults.mdx

1
agent/structs/config_entry.go

@ -418,6 +418,7 @@ type InstanceLevelRateLimits struct {
RequestsMaxBurst int `alias:"requests_max_burst"` RequestsMaxBurst int `alias:"requests_max_burst"`
// Routes is a list of rate limits applied to specific routes. // 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. // Overrides any top-level configuration.
Routes []InstanceLevelRouteRateLimits Routes []InstanceLevelRouteRateLimits
} }

1
api/config_entry.go

@ -341,6 +341,7 @@ type InstanceLevelRateLimits struct {
RequestsMaxBurst int `alias:"requests_max_burst"` RequestsMaxBurst int `alias:"requests_max_burst"`
// Routes is a list of rate limits applied to specific routes. // 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. // Overrides any top-level configuration.
Routes []InstanceLevelRouteRateLimits Routes []InstanceLevelRouteRateLimits
} }

2
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` - `PathPrefix`
- `PathRegex` - `PathRegex`
Refer to [Examples](#enable-request-rate-limit-on-a-prefixed-path) for example configurations. Consul applies the rate limit configuration to the first matching route for each request. Refer to [Examples](#enable-request-rate-limit-on-a-prefixed-path) for example configurations.
#### Values #### Values

Loading…
Cancel
Save