Config file changes
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user