mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-15 05:24:14 +01:00
whitelist fixes, grpc stream fixes
This commit is contained in:
parent
e3e07fe117
commit
8164d737bf
5 changed files with 29 additions and 12 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue