diff --git a/app/flood.py b/app/flood.py index 377d85ef3f27fbee01645600c97500970be52f8f..31ee416f9fd2fca003fe80f3d902a57c04d26695 100644 --- a/app/flood.py +++ b/app/flood.py @@ -28,8 +28,9 @@ def setup(violations_threshold = 100): def report(request_ip): - banned[request_ip] = banned.get(request_ip, 0) - banned[request_ip] += 1 + if active: + banned[request_ip] = banned.get(request_ip, 0) + banned[request_ip] += 1 def is_banned(request_ip): # More than X offences?