aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-06-14 09:26:26 +0000
committerlain <lain@soykaf.club>2019-06-14 09:26:26 +0000
commit28cb9edde9638c0773d48ba6fc03667393e15a15 (patch)
tree044ae256a5abe716f47e1cdff09aae2187b9f25a /lib
parent00cc4880cefc039e5b49c8ed916a26bac7219b5c (diff)
parentb22b10d3aac391dabd17349158ce642c7e1cae93 (diff)
downloadpleroma-28cb9edde9638c0773d48ba6fc03667393e15a15.tar.gz
Merge branch '986-document-how-to-disable-rate-limiting' into 'develop'
Resolve "Document how to disable rate limiting" Closes #986 See merge request pleroma/pleroma!1285
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/plugs/rate_limiter.ex11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/pleroma/plugs/rate_limiter.ex b/lib/pleroma/plugs/rate_limiter.ex
index e02ba4213..9ba5875fa 100644
--- a/lib/pleroma/plugs/rate_limiter.ex
+++ b/lib/pleroma/plugs/rate_limiter.ex
@@ -14,13 +14,20 @@ defmodule Pleroma.Plugs.RateLimiter do
It is also possible to have different limits for unauthenticated and authenticated users: the keyword value must be a list of two tuples where the first one is a config for unauthenticated users and the second one is for authenticated.
+ To disable a limiter set its value to `nil`.
+
### Example
config :pleroma, :rate_limit,
one: {1000, 10},
- two: [{10_000, 10}, {10_000, 50}]
+ two: [{10_000, 10}, {10_000, 50}],
+ foobar: nil
+
+ Here we have three limiters:
- Here we have two limiters: `one` which is not over 10req/1s and `two` which has two limits 10req/10s for unauthenticated users and 50req/10s for authenticated users.
+ * `one` which is not over 10req/1s
+ * `two` which has two limits: 10req/10s for unauthenticated users and 50req/10s for authenticated users
+ * `foobar` which is disabled
## Usage