summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2019-10-07 09:16:42 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2019-10-07 09:16:42 +0000
commit15592f1abe117761b90846e02194a35982f3bebf (patch)
tree2910113e8a4ed4d225a4ffc8b6b95d56e782367f /config
parentb4f3c16885a489c40de82e5ef321caafa4b10c81 (diff)
parent28fb98d69e31ce5a09e15e213491b880430a0902 (diff)
downloadpleroma-15592f1abe117761b90846e02194a35982f3bebf.tar.gz
pleroma-15592f1abe117761b90846e02194a35982f3bebf.zip
Merge branch '1260-rate-limited-auth-actions' into 'develop'
[#1260] Rate-limiting for create authentication and related requests Closes #1260 See merge request pleroma/pleroma!1681
Diffstat (limited to 'config')
-rw-r--r--config/config.exs2
-rw-r--r--config/description.exs9
2 files changed, 9 insertions, 2 deletions
diff --git a/config/config.exs b/config/config.exs
index ddbfb246a..cf94f1a19 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -588,7 +588,7 @@ config :pleroma, :env, Mix.env()
config :http_signatures,
adapter: Pleroma.Signature
-config :pleroma, :rate_limit, nil
+config :pleroma, :rate_limit, authentication: {60_000, 15}
config :pleroma, Pleroma.ActivityExpiration, enabled: true
diff --git a/config/description.exs b/config/description.exs
index 4547ea368..b007cf69c 100644
--- a/config/description.exs
+++ b/config/description.exs
@@ -2290,7 +2290,8 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :rate_limit,
type: :group,
- description: "Rate limit settings. This is an advanced feature and disabled by default.",
+ description:
+ "Rate limit settings. This is an advanced feature enabled only for :authentication by default.",
children: [
%{
key: :search,
@@ -2329,6 +2330,12 @@ config :pleroma, :config_description, [
description:
"for fav / unfav or reblog / unreblog actions on the same status by the same user",
suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
+ },
+ %{
+ key: :authentication,
+ type: [:tuple, {:list, :tuple}],
+ description: "for authentication create / password check / user existence check requests",
+ suggestions: [{60_000, 15}]
}
]
},