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.
34 lines
522 B
34 lines
522 B
//! Server for datse
|
|
use super::*;
|
|
|
|
/// Configuration for the server.
|
|
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
|
pub struct Config
|
|
{
|
|
pub trust_x_forwarded_for: bool,
|
|
}
|
|
|
|
impl Config
|
|
{
|
|
/// The default configuration
|
|
pub const DEFAULT: Self = Self::_default();
|
|
|
|
#[inline(always)] const fn _default() -> Self
|
|
{
|
|
Self {
|
|
trust_x_forwarded_for: false,
|
|
}
|
|
}
|
|
}
|
|
|
|
impl Default for Config
|
|
{
|
|
#[inline]
|
|
fn default() -> Self
|
|
{
|
|
Self::_default()
|
|
}
|
|
}
|
|
|
|
pub mod web;
|