Commit bc8f0593 authored by minibikini's avatar minibikini

Add rate limiting for search endpoints

parent 2e5affce
......@@ -503,6 +503,8 @@
config :http_signatures,
adapter: Pleroma.Signature
config :pleroma, :rate_limit, search: [{1000, 10}, {1000, 30}]
# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{Mix.env()}.exs"
......@@ -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"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment