Django IP Access Middleware

Welcome to the documentation for Django IP Access Middleware.

This package provides IP and hostname-based access control for Django applications. It supports:

  • IP addresses and CIDR ranges stored in the database
  • Hostname matching via environment variables
  • Same-network detection for Kubernetes and private networks
  • Route-based access control with regex, exact, startswith, and endswith patterns
  • Mixins and decorators for opt-in protection of specific views

Use the navigation on the left to learn how to install, configure, and use the middleware in your project.