mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-29 15:15:37 +00:00
(feat) user rate-limiting support for all SOGo requests
This commit is contained in:
@@ -598,6 +598,42 @@ _injectConfigurationFromFile (NSMutableDictionary *defaultsDict,
|
||||
return v;
|
||||
}
|
||||
|
||||
//
|
||||
// SOGo rate-limiting
|
||||
//
|
||||
- (int) maximumRequestCount
|
||||
{
|
||||
return [self integerForKey: @"SOGoMaximumRequestCount"];
|
||||
}
|
||||
|
||||
- (int) maximumRequestInterval
|
||||
{
|
||||
int v;
|
||||
|
||||
v = [self integerForKey: @"SOGoMaximumRequestInterval"];
|
||||
|
||||
if (!v)
|
||||
v = 30;
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
- (int) requestBlockInterval
|
||||
{
|
||||
int v;
|
||||
|
||||
v = [self integerForKey: @"SOGoRequestBlockInterval"];
|
||||
|
||||
if (!v)
|
||||
v = 300;
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// SOGo EAS settings
|
||||
//
|
||||
- (int) maximumPingInterval
|
||||
{
|
||||
int v;
|
||||
|
||||
Reference in New Issue
Block a user