mirror of
https://github.com/simple-login/app.git
synced 2024-11-13 07:31:12 +01:00
Increase limit for the dashboard and do it by user
This commit is contained in:
parent
dc39ab2de7
commit
2a9c1c5658
2 changed files with 3 additions and 7 deletions
|
@ -31,6 +31,7 @@ from app.models import Alias, Contact, Mailbox, AliasMailbox
|
|||
@deprecated
|
||||
@api_bp.route("/aliases", methods=["GET", "POST"])
|
||||
@require_api_auth
|
||||
@limiter.limit("10/minute", key_func=lambda: g.user.id)
|
||||
def get_aliases():
|
||||
"""
|
||||
Get aliases
|
||||
|
@ -72,10 +73,8 @@ def get_aliases():
|
|||
|
||||
|
||||
@api_bp.route("/v2/aliases", methods=["GET", "POST"])
|
||||
@limiter.limit(
|
||||
"5/minute",
|
||||
)
|
||||
@require_api_auth
|
||||
@limiter.limit("10/minute", key_func=lambda: g.user.id)
|
||||
def get_aliases_v2():
|
||||
"""
|
||||
Get aliases
|
||||
|
|
|
@ -57,10 +57,7 @@ def get_stats(user: User) -> Stats:
|
|||
methods=["POST"],
|
||||
exempt_when=lambda: request.form.get("form-name") != "create-random-email",
|
||||
)
|
||||
@limiter.limit(
|
||||
"5/minute",
|
||||
methods=["GET"],
|
||||
)
|
||||
@limiter.limit("10/minute", methods=["GET"], key_func=lambda: current_user.id)
|
||||
@login_required
|
||||
@parallel_limiter.lock(
|
||||
name="alias_creation",
|
||||
|
|
Loading…
Reference in a new issue