You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
611 B

//! Server for datse
use super::*;
use web::ban::BanKind;
/// Configuration for the server.
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct Config
{
pub trust_x_forwarded_for: bool,
pub static_bans: Vec<BanKind>,
}
impl Config
{
/// The default configuration
pub const DEFAULT: Self = Self::_default();
#[inline(always)] const fn _default() -> Self
{
Self {
trust_x_forwarded_for: false,
static_bans: Vec::new(),
}
}
}
impl Default for Config
{
#[inline]
fn default() -> Self
{
Self::_default()
}
}
pub mod web;