Middleware and utilities for handling X-Forwarded-For and related proxy headers in Django. Version 1.5.0 is current; releases are infrequent.
pip install django-xffNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Add the middleware to INSTALLED_APPS (auto-discovered) or MIDDLEWARE. Set XFF_USE_PROXY = True when behind a trusted proxy to rewrite REMOTE_ADDR.
Use 'from xff.middleware import XForwardedForMiddleware' or the dotted string 'xff.middleware.XForwardedForMiddleware' in MIDDLEWARE.
Set XFF_USE_PROXY = True in Django settings.
Manually validate or use a custom middleware if you need strict proxy chain validation.
Run 'pip install django-xff'.
Change to 'from xff.middleware import XForwardedForMiddleware'.
Ensure the middleware is only used with WSGI/ASGI HTTP requests.