mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Chore: upgrade python-ipware dependency (#4446)
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import logging
|
||||
|
||||
from django.conf import settings
|
||||
from ipware import IpWare
|
||||
from python_ipware import IpWare
|
||||
|
||||
logger = logging.getLogger("paperless.auth")
|
||||
|
||||
|
||||
# https://docs.djangoproject.com/en/4.1/ref/contrib/auth/#django.contrib.auth.signals.user_login_failed
|
||||
def handle_failed_login(sender, credentials, request, **kwargs):
|
||||
ipware = IpWare(proxy_trusted_list=settings.TRUSTED_PROXIES)
|
||||
ipware = IpWare(proxy_list=settings.TRUSTED_PROXIES)
|
||||
client_ip, _ = ipware.get_client_ip(
|
||||
meta=request.META,
|
||||
)
|
||||
|
Reference in New Issue
Block a user