diff --git a/doc/content/reference/rate-limiting/_index.md b/doc/content/reference/rate-limiting/_index.md index fa1015e60e..05710c1df4 100644 --- a/doc/content/reference/rate-limiting/_index.md +++ b/doc/content/reference/rate-limiting/_index.md @@ -67,7 +67,7 @@ This section lists resources of {{% tts %}} on which a maximum rate limit can be {{< rate-limiting >}} -{{< note >}} gRPC Requests support multiple classes. This is to enable overriding the generic rate limits for specific gRPC methods. {{}} +{{< note >}} Both gRPC methods and HTTP endpoints support multiple classes. This enables overriding the generic rate limits for specific methods and endpoints. {{}} {{< warning >}} When {{% tts %}} HTTP and gRPC endpoints are served behind a reverse proxy, the `X-Forwarded-For` header is respected for the remote IP. The IP address of the reverse proxy must be trusted by {{% tts %}} for this to work, see [HTTP options]({{< ref "/reference/configuration/the-things-stack#http-options" >}}) and [gRPC Options]({{< ref "/reference/configuration/the-things-stack#grpc-options" >}}). {{}} diff --git a/doc/data/rate-limiting.yml b/doc/data/rate-limiting.yml index 955d8db64a..b66682236c 100644 --- a/doc/data/rate-limiting.yml +++ b/doc/data/rate-limiting.yml @@ -90,9 +90,10 @@ - http - resource: OAuth Server, Account App, Gateway Configuration Server, Interop Server, Metrics, Health, pprof - description: Limit number of HTTP requests by remote IP and request URL. `{{ Server }}` is `oauth`, `account`, `gcs`, `interop`, `metrics`, `health`, `pprof` respectively. - key: http:{{ Server }}:ip:{{ RemoteIP }}:url:{{ URL }} + description: Limit number of HTTP requests by remote IP and request URL. `{{ Server }}` is `oauth`, `account`, `gcs`, `interop`, `metrics`, `health`, `pprof` respectively. `{{ AuthInfo }}` is either `ip:{{ RemoteIP }}` or `token:{{ AuthTokenID }}` if the caller presents authentication information. + key: http:{{ Server }}:{{ AuthInfo }}:url:{{ URL }} example-key: http:oauth:ip:10.10.10.10:url:/authorize classes: + - http:{{ Server }}:{{ URLTemplate }} - http:{{ Server }} - http diff --git a/doc/themes/the-things-stack/layouts/shortcodes/rate-limiting.html b/doc/themes/the-things-stack/layouts/shortcodes/rate-limiting.html index c84841f1b1..1b75a4b52e 100644 --- a/doc/themes/the-things-stack/layouts/shortcodes/rate-limiting.html +++ b/doc/themes/the-things-stack/layouts/shortcodes/rate-limiting.html @@ -6,7 +6,7 @@

{{- .resource -}}

- +
Description{{ index . "description" }}Description{{ (index . "description") | transform.Markdownify }}
Classes{{- delimit (index . "classes") " " }}