pub struct Config {Show 17 fields
pub name: String,
pub description: String,
pub port: u16,
pub banned_hosts: Vec<String>,
pub host: String,
pub service_hosts: ServiceHostsConfig,
pub security: SecurityConfig,
pub dirs: DirsConfig,
pub database: DatabaseConfig,
pub banned_usernames: Vec<String>,
pub policies: PoliciesConfig,
pub turnstile: TurnstileConfig,
pub connections: ConnectionsConfig,
pub stripe: Option<StripeConfig>,
pub manuals: ManualsConfig,
pub banned_data: Vec<StringBan>,
pub persistent_banner: String,
}Expand description
Configuration file
Fields§
§name: StringThe name of the app.
description: StringThe description of the app.
port: u16The port to serve the server on.
banned_hosts: Vec<String>A list of hosts which cannot be proxied through the image proxy.
They will return the default banner image instead of proxying.
It is recommended to put the host of your own public server in this list in order to prevent a way too easy DOS.
host: StringThe main public host of the server. Not used to check against banned hosts, so this host should be included in there as well.
service_hosts: ServiceHostsConfigThe main public host of the required microservices.
security: SecurityConfigDatabase security.
dirs: DirsConfigThe locations where different files should be matched.
database: DatabaseConfigDatabase configuration.
banned_usernames: Vec<String>A list of usernames which cannot be used. This also includes community names.
policies: PoliciesConfigConfiguration for your site’s policies (terms of service, privacy).
turnstile: TurnstileConfigConfiguration for Cloudflare Turnstile.
connections: ConnectionsConfig§stripe: Option<StripeConfig>§manuals: ManualsConfigThe relative paths to manuals.
banned_data: Vec<StringBan>A list of banned content in posts.
A banner shown on every page of the site.
Implementations§
Trait Implementations§
Source§impl Configuration for Config
impl Configuration for Config
fn db_config(&self) -> DatabaseConfig
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more