I'm trying to limit the number of requests from an IP in case I get too many requests from it.
For example: if I will get more than 50 requests per minute I want to block that IP for 5 minutes.
When I use request.META['REMOTE_ADDR']
I always get the IP of the local host and not the one that sent the request.
- How can I get the IP of the computer that sent the request?
- How can I limit that IP to not send more requests for X time?