Skip to content

Commit

Permalink
Merge pull request #310 from openimis/feature/use-cache-axes
Browse files Browse the repository at this point in the history
Update security.py
  • Loading branch information
dragos-dobre authored Nov 13, 2024
2 parents 9492c0f + 6330792 commit a51e221
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openIMIS/openIMIS/settings/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
AXES_ENABLED = True if os.environ.get("MODE", "DEV") == "PROD" else False
AXES_FAILURE_LIMIT = int(os.getenv("LOGIN_LOCKOUT_FAILURE_LIMIT", 5))
AXES_COOLOFF_TIME = timedelta(minutes=int(os.getenv("LOGIN_LOCKOUT_COOLOFF_TIME", 5)))
AXES_HANDLER = os.environ.get("AXES_HANDLER", 'axes.handlers.cache.AxesCacheHandler')
AXES_ENABLED = True if os.environ.get("AXES_ENABLED", "true").lower() == "true" else False
# AXES_LOCKOUT_PARAMETERS = ['username']

RATELIMIT_CACHE = os.getenv('RATELIMIT_CACHE', 'default')
RATELIMIT_KEY = os.getenv('RATELIMIT_KEY', 'ip')
Expand All @@ -105,4 +108,4 @@
PASSWORD_UPPERCASE = int(os.getenv('PASSWORD_UPPERCASE', 1))
PASSWORD_LOWERCASE = int(os.getenv('PASSWORD_LOWERCASE', 1))
PASSWORD_DIGITS = int(os.getenv('PASSWORD_DIGITS', 1))
PASSWORD_SYMBOLS = int(os.getenv('PASSWORD_SYMBOLS', 1))
PASSWORD_SYMBOLS = int(os.getenv('PASSWORD_SYMBOLS', 1))

0 comments on commit a51e221

Please sign in to comment.