whitelist fixes, grpc stream fixes

This commit is contained in:
Stanley Dimant
2022-10-20 23:08:46 +02:00
parent e3e07fe117
commit 8164d737bf
5 changed files with 29 additions and 12 deletions

View File

@@ -176,7 +176,13 @@ public class SecretKeyAuthenticationHandler
this.metrics = metrics;
var config = configuration.GetRequiredSection("MareSynchronos");
_failedAttemptsForTempBan = config.GetValue<int>("FailedAuthForTempBan", 5);
logger.LogInformation("FailedAuthForTempBan: {num}", _failedAttemptsForTempBan);
_tempBanMinutes = config.GetValue<int>("TempBanDurationInMinutes", 30);
_whitelistedIps = config.GetValue<List<string>>("WhitelistedIps", new List<string>());
logger.LogInformation("TempBanMinutes: {num}", _tempBanMinutes);
_whitelistedIps = config.GetSection("WhitelistedIps").Get<List<string>>();
foreach (var ip in _whitelistedIps)
{
logger.LogInformation("Whitelisted IP: " + ip);
}
}
}