Skip to content

cinaaaa/django-mosquito

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Mosquito 🦟

Limit visitors to your django app by count

Whats Django Mosquito

Mosquito middleware helps you set limit of visiting you django for each user

Installation

pip install djangomosquito

Import

import it inside middleware in django settings

middlewares = [
  ...,
  'djangomosquito.middleware.DjangoMosquito',
  ...,
]

Usage

This middleware do it job you just need to set limit number and by setting the limit number after reaching this number user get banned from your website for 1 day

How

settings.py

# after 100 requests user get banned
LIMIT_MOSQUITO = 100