summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2019-06-11 14:28:39 +0700
committerEgor Kislitsyn <egor@kislitsyn.com>2019-06-11 14:28:39 +0700
commitbc8f0593670452851d5e9d97bea1ae90f10db354 (patch)
tree96aadebecc684b7366f8d5d5811fa3ffe4d4f1b9 /lib
parent2e5affce61a9255602d3a5d4c5caced9f09b1f5a (diff)
downloadpleroma-bc8f0593670452851d5e9d97bea1ae90f10db354.tar.gz
pleroma-bc8f0593670452851d5e9d97bea1ae90f10db354.zip
Add rate limiting for search endpoints
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index 92cd77f62..20b08fda4 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@ -55,6 +55,8 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
when action in [:account_register]
)
+ plug(Pleroma.Plugs.RateLimiter, :search when action in [:search, :search2, :account_search])
+
@local_mastodon_name "Mastodon-Local"
action_fallback(:errors)