Chore: upgrade python-ipware dependency (#4446)

This commit is contained in:
shamoon
2023-10-30 10:16:49 -07:00
committed by GitHub
parent 38e035b95c
commit 0f1dea67b7
2 changed files with 5 additions and 6 deletions

View File

@@ -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,
)