mirror of
https://github.com/Mailu/Mailu.git
synced 2025-01-30 04:30:49 +02:00
Don't rate-limit port 25, ever.
This commit is contained in:
parent
ab7b82d05b
commit
94ef62a884
@ -21,7 +21,7 @@ def nginx_authentication():
|
||||
utils.limiter.rate_limit_ip(client_ip)
|
||||
return response
|
||||
is_from_webmail = headers['Auth-Port'] in ['10143', '10025']
|
||||
if not is_from_webmail and utils.limiter.should_rate_limit_ip(client_ip):
|
||||
if not is_from_webmail and not is_port_25 and utils.limiter.should_rate_limit_ip(client_ip):
|
||||
status, code = nginx.get_status(flask.request.headers['Auth-Protocol'], 'ratelimit')
|
||||
response = flask.Response()
|
||||
response.headers['Auth-Status'] = status
|
||||
|
Loading…
x
Reference in New Issue
Block a user