Merge branch '1813-throttling' into 'develop'
Mastodon API Controllers: Use the correct params for rate limiting. Closes #1813 See merge request pleroma/pleroma!2586
This commit is contained in:
commit
ed08da9135
|
@ -81,7 +81,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do
|
||||||
|
|
||||||
plug(
|
plug(
|
||||||
RateLimiter,
|
RateLimiter,
|
||||||
[name: :relation_id_action, params: ["id", "uri"]] when action in @relationship_actions
|
[name: :relation_id_action, params: [:id, :uri]] when action in @relationship_actions
|
||||||
)
|
)
|
||||||
|
|
||||||
plug(RateLimiter, [name: :relations_actions] when action in @relationship_actions)
|
plug(RateLimiter, [name: :relations_actions] when action in @relationship_actions)
|
||||||
|
|
|
@ -84,13 +84,13 @@ defmodule Pleroma.Web.MastodonAPI.StatusController do
|
||||||
|
|
||||||
plug(
|
plug(
|
||||||
RateLimiter,
|
RateLimiter,
|
||||||
[name: :status_id_action, bucket_name: "status_id_action:reblog_unreblog", params: ["id"]]
|
[name: :status_id_action, bucket_name: "status_id_action:reblog_unreblog", params: [:id]]
|
||||||
when action in ~w(reblog unreblog)a
|
when action in ~w(reblog unreblog)a
|
||||||
)
|
)
|
||||||
|
|
||||||
plug(
|
plug(
|
||||||
RateLimiter,
|
RateLimiter,
|
||||||
[name: :status_id_action, bucket_name: "status_id_action:fav_unfav", params: ["id"]]
|
[name: :status_id_action, bucket_name: "status_id_action:fav_unfav", params: [:id]]
|
||||||
when action in ~w(favourite unfavourite)a
|
when action in ~w(favourite unfavourite)a
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue