Change metrics_whitelist type from Vec<IpAddr> to Vec<IpNetwork>

This commit is contained in:
artemws 2026-02-20 16:03:38 +02:00 committed by GitHub
parent 8f1f051a54
commit dbd9b53940
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
use chrono::{DateTime, Utc};
use ipnetwork::IpNetwork;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use std::net::IpAddr;
@ -304,7 +305,7 @@ pub struct ServerConfig {
pub metrics_port: Option<u16>,
#[serde(default = "default_metrics_whitelist")]
pub metrics_whitelist: Vec<IpAddr>,
pub metrics_whitelist: Vec<IpNetwork>,
#[serde(default)]
pub listeners: Vec<ListenerConfig>,