Config file changes

This commit is contained in:
mdecimus
2024-03-20 12:03:10 +01:00
parent 9a4110e343
commit 7e1a95c1ee
21 changed files with 126 additions and 93 deletions

View File

@@ -55,6 +55,7 @@ impl From<std::io::Error> for crate::Error {
}
}
#[allow(dead_code)]
fn deserialize_i64_le(bytes: &[u8]) -> crate::Result<i64> {
Ok(i64::from_le_bytes(bytes[..].try_into().map_err(|_| {
crate::Error::InternalError("Failed to deserialize i64 value.".to_string())

View File

@@ -62,7 +62,7 @@ impl BlockedIps {
pub fn reload(&self, config: &Config) -> utils::config::Result<()> {
self.limiter_rate.store(
config
.property::<Rate>("server.security.fail2ban")?
.property::<Rate>("authentication.fail2ban")?
.map(Arc::new),
);
self.reload_blocked_ips(config.set_values(BLOCKED_IP_KEY))