mirror of
https://github.com/Mailu/Mailu.git
synced 2024-12-14 10:53:30 +02:00
doh
This commit is contained in:
parent
99c81c20a7
commit
c5bd82650f
@ -39,7 +39,7 @@ class LimitWraperFactory(object):
|
|||||||
return LimitWrapper(self.limiter, limits.parse(limit), *args)
|
return LimitWrapper(self.limiter, limits.parse(limit), *args)
|
||||||
|
|
||||||
def is_subject_to_rate_limits(self, ip):
|
def is_subject_to_rate_limits(self, ip):
|
||||||
return False if utils.is_subject_to_rate_limits(ip) else not (self.storage.get(f'exempt-{ip}') > 0)
|
return False if utils.is_exempt_from_ratelimits(ip) else not (self.storage.get(f'exempt-{ip}') > 0)
|
||||||
|
|
||||||
def exempt_ip_from_ratelimits(self, ip):
|
def exempt_ip_from_ratelimits(self, ip):
|
||||||
self.storage.incr(f'exempt-{ip}', app.config["AUTH_RATELIMIT_EXEMPTION_LENGTH"], True)
|
self.storage.incr(f'exempt-{ip}', app.config["AUTH_RATELIMIT_EXEMPTION_LENGTH"], True)
|
||||||
|
Loading…
Reference in New Issue
Block a user