X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fplugs%2Frate_limiter.ex;h=9ba5875fa31aa21434f6a129d99da2e9b1b64634;hb=8dbcff2fed0bf6fb20b70388974fcbe9d3a0aeee;hp=e02ba4213acbcc8d0b4c5b506b4d55cad6163b52;hpb=63ab3c30ebb33241074cb252c449cd7879b77870;p=akkoma 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