sageteamorg / django-sage-tools

Reusable, generic mixins for Django
MIT License
6 stars 5 forks source link

✨ Add IP Restriction Middleware #19

Open ARYAN-NIKNEZHAD opened 3 months ago

ARYAN-NIKNEZHAD commented 3 months ago

Requirements

  1. Middleware Functionality:

    • Create a middleware class IPRestrictionMiddleware that will process each request and restrict access based on IP addresses.
    • Support specifying allowed and denied IP addresses via settings.
    • Provide clear HTTP responses when access is denied.
  2. Integration:

    • Ensure compatibility with existing authentication and permission systems.

Acceptance Criteria