mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 19:47:21 +01:00
check for existence of WhitelistedIps
This commit is contained in:
parent
8164d737bf
commit
c13e457780
1 changed files with 7 additions and 3 deletions
|
|
@ -179,10 +179,14 @@ public class SecretKeyAuthenticationHandler
|
|||
logger.LogInformation("FailedAuthForTempBan: {num}", _failedAttemptsForTempBan);
|
||||
_tempBanMinutes = config.GetValue<int>("TempBanDurationInMinutes", 30);
|
||||
logger.LogInformation("TempBanMinutes: {num}", _tempBanMinutes);
|
||||
_whitelistedIps = config.GetSection("WhitelistedIps").Get<List<string>>();
|
||||
foreach (var ip in _whitelistedIps)
|
||||
var whitelisted = config.GetSection("WhitelistedIps");
|
||||
if (!string.IsNullOrEmpty(whitelisted.Value))
|
||||
{
|
||||
logger.LogInformation("Whitelisted IP: " + ip);
|
||||
_whitelistedIps = whitelisted.Get<List<string>>();
|
||||
foreach (var ip in _whitelistedIps)
|
||||
{
|
||||
logger.LogInformation("Whitelisted IP: " + ip);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue