reduce certain rate limits by half

This commit is contained in:
Luna D 2021-09-10 19:34:21 +02:00
parent 4184e94219
commit 73cb4f46cc
No known key found for this signature in database
GPG key ID: 81AF416F2CC36FC8
3 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@ defmodule PhilomenaWeb.Image.CommentController do
alias Philomena.Images alias Philomena.Images
plug PhilomenaWeb.LimitPlug, plug PhilomenaWeb.LimitPlug,
[time: 30, error: "You may only create a comment once every 30 seconds."] [time: 15, error: "You may only create a comment once every 15 seconds."]
when action in [:create] when action in [:create]
plug PhilomenaWeb.FilterBannedUsersPlug when action in [:create, :edit, :update] plug PhilomenaWeb.FilterBannedUsersPlug when action in [:create, :edit, :update]

View file

@ -20,7 +20,7 @@ defmodule PhilomenaWeb.ImageController do
import Ecto.Query import Ecto.Query
plug PhilomenaWeb.LimitPlug, plug PhilomenaWeb.LimitPlug,
[time: 10, error: "You may only upload images once every 10 seconds."] [time: 5, error: "You may only upload images once every 5 seconds."]
when action in [:create] when action in [:create]
plug :load_image when action in [:show] plug :load_image when action in [:show]

View file

@ -6,7 +6,7 @@ defmodule PhilomenaWeb.Topic.PostController do
alias Philomena.UserStatistics alias Philomena.UserStatistics
plug PhilomenaWeb.LimitPlug, plug PhilomenaWeb.LimitPlug,
[time: 30, error: "You may only make a post once every 30 seconds."] [time: 15, error: "You may only make a post once every 15 seconds."]
when action in [:create] when action in [:create]
plug PhilomenaWeb.FilterBannedUsersPlug plug PhilomenaWeb.FilterBannedUsersPlug