Remove rate limit reset

master
Michael Wyraz 5 years ago
parent c079f2ac4a
commit bee80b5c64

@ -17,9 +17,7 @@ def nginx_authentication():
response = flask.Response()
for key, value in headers.items():
response.headers[key] = str(value)
if ("Auth-Status" in headers) and (headers["Auth-Status"]=="OK"):
utils.limiter.reset(flask.request.headers["Client-Ip"])
else:
if ("Auth-Status" not in headers) or (headers["Auth-Status"]!="OK"):
utils.limiter.hit(flask.request.headers["Client-Ip"])
return response

@ -35,11 +35,3 @@ class Limiter:
# return
if not self.limiter.hit(self.rate,"client-ip",clientip):
raise RateLimitExceeded()
def reset(self,clientip):
# TODO: activate this code if we have limits at webmail level
#if ipaddress.ip_address(clientip) in self.subnet:
# # no limits for internal requests (e.g. from webmail)
# return
# limit reset is not supported by the rate limit library
pass

Loading…
Cancel
Save