-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #158 from chirino/enable_x_ratelimit_headers
Adding response headers in the RLS server
- Loading branch information
Showing
19 changed files
with
648 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ Dockerfile | |
*.swp | ||
.dockerignore | ||
.git | ||
|
||
# OSX files | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,6 @@ | |
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
# OSX files | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,15 +12,36 @@ ARGS: | |
<LIMITS_FILE> The limit file to use | ||
OPTIONS: | ||
-b, --rls-ip <ip> The IP to listen on for RLS [default: 0.0.0.0] | ||
-p, --rls-port <port> The port to listen on for RLS [default: 8081] | ||
-B, --http-ip <http_ip> The IP to listen on for HTTP [default: 0.0.0.0] | ||
-P, --http-port <http_port> The port to listen on for HTTP [default: 8080] | ||
-l, --limit-name-in-labels Include the Limit Name in prometheus label | ||
-v Sets the level of verbosity | ||
--validate Validates the LIMITS_FILE and exits | ||
-h, --help Print help information | ||
-V, --version Print version information | ||
-b, --rls-ip <ip> | ||
The IP to listen on for RLS [default: 0.0.0.0] | ||
-p, --rls-port <port> | ||
The port to listen on for RLS [default: 8081] | ||
-B, --http-ip <http_ip> | ||
The IP to listen on for HTTP [default: 0.0.0.0] | ||
-P, --http-port <http_port> | ||
The port to listen on for HTTP [default: 8080] | ||
-l, --limit-name-in-labels | ||
Include the Limit Name in prometheus label | ||
-v | ||
Sets the level of verbosity | ||
--validate | ||
Validates the LIMITS_FILE and exits | ||
-H, --rate-limit-headers <rate_limit_headers> | ||
Enables rate limit response headers [default: NONE] [possible values: NONE, | ||
DRAFT_VERSION_03] | ||
-h, --help | ||
Print help information | ||
-V, --version | ||
Print version information | ||
STORAGES: | ||
memory Counters are held in Limitador (ephemeral) | ||
|
@@ -319,3 +340,13 @@ require Redis. | |
- Optional. By default, Limitador stores the limits in memory and does not | ||
require Infinispan. | ||
- Format: `URL`, in the format of `http://username:[email protected]:11222`. | ||
#### `RATE_LIMIT_HEADERS` | ||
- Enables rate limit response headers. Only supported by the RLS server. | ||
- Optional. Defaults to `"NONE"`. | ||
- Must be one of: | ||
- `"NONE"` - Does not add any additional headers to the http response. | ||
- `"DRAFT_VERSION_03"`. Adds response headers per https://datatracker.ietf.org/doc/id/draft-polli-ratelimit-headers-03.html | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.