1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-09 19:56:48 +00:00

chore(accounts): django-axes keeps no record of successful logins

django-axes wrote an AccessLog row at every successful login and nothing
removed them; the Logs page already records each login. Its access log
is now off; failed logins are still counted for the lock.
This commit is contained in:
catborise 2026-11-05 09:40:44 +03:00
parent ae03679b0e
commit 93b420ae81
2 changed files with 10 additions and 0 deletions

View file

@ -191,6 +191,8 @@ AXES_FAILURE_LIMIT = "accounts.lockout.failure_limit"
AXES_COOLOFF_TIME = "accounts.lockout.cooloff_time"
AXES_LOCKOUT_PARAMETERS = [["username", "ip_address"]]
AXES_RESET_ON_SUCCESS = True
# successful logins are on the Logs page; django-axes' own record of them would only grow
AXES_DISABLE_ACCESS_LOG = True
AXES_CLIENT_IP_CALLABLE = "accounts.lockout.client_ip"
# Reverse proxies other than a local one whose X-Real-IP header gives the
# client address, e.g. ["10.0.0.5", "172.18.0.0/16"]