Rate Limit the OAuth App spam

This commit is contained in:
Mark Felder 2024-09-04 09:19:07 -04:00
commit 427da7a99a
3 changed files with 4 additions and 0 deletions

View file

@ -19,6 +19,8 @@ defmodule Pleroma.Web.MastodonAPI.AppController do
action_fallback(Pleroma.Web.MastodonAPI.FallbackController)
plug(Pleroma.Web.Plugs.RateLimiter, [name: :oauth_app_creation] when action == :create)
plug(:skip_auth when action in [:create, :verify_credentials])
plug(Pleroma.Web.ApiSpec.CastAndValidate)