Skip to content

Commit

Permalink
doc: Add rate limiting extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
adriansmares committed Nov 21, 2023
1 parent d32eb35 commit 3cdfc91
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/content/reference/rate-limiting/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 >}}
{{< note >}} Both gRPC methods and HTTP endpoints support multiple classes. This enables overriding the generic rate limits for specific methods and endpoints. {{</ note >}}
{{< 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" >}}). {{</ warning >}}

Expand Down
7 changes: 4 additions & 3 deletions doc/data/rate-limiting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,11 @@
- http:gcs:cups
- 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 }}
- resource: OAuth Server, Account App, Gateway Configuration Server, Interop Server, Metrics, Health, pprof, Azure IoT Central integration
description: Limit number of HTTP requests by remote IP and request URL. `{{ Server }}` is `oauth`, `account`, `gcs`, `interop`, `metrics`, `health`, `pprof` or `as:io:packages:azure:iotcentral` 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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h3 id="{{.resource | urlize}}">{{- .resource -}}</h3>
<table class="fixed">
<tbody>
<tr>
<td><b>Description</b></td><td>{{ index . "description" }}</td>
<td><b>Description</b></td><td>{{ (index . "description") | transform.Markdownify }}</td>
</tr>
<tr>
<td><b>Classes</b></td><td><code>{{- delimit (index . "classes") "</code> <code>" }}</code></td>
Expand Down

0 comments on commit 3cdfc91

Please sign in to comment.