Skip to content

Commit

Permalink
set meta limit for ddos
Browse files Browse the repository at this point in the history
  • Loading branch information
itoulou committed Sep 28, 2023
1 parent e86177e commit 35f6f72
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def add_header(response):
# Admin page
from admin.admin import admin
if rate_limiter:
rate_limiter.meta_limits = ["5 per minute"]
rate_limiter.limit('5 per minute')(admin)
app.register_blueprint(admin)

Expand All @@ -87,6 +88,7 @@ def add_header(response):
# Password reset
from admin.password_reset import password_reset
if rate_limiter:
rate_limiter.meta_limits = ["5 per minute"]
rate_limiter.limit('5 per minute')(password_reset)
app.register_blueprint(password_reset)

Expand Down

0 comments on commit 35f6f72

Please sign in to comment.