pub struct Config {Show 24 fields
pub name: String,
pub description: String,
pub color: 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 no_track: Vec<String>,
pub banned_usernames: Vec<String>,
pub policies: PoliciesConfig,
pub turnstile: TurnstileConfig,
pub town_square: usize,
pub town_square_forum: usize,
pub town_square_forum_topic: usize,
pub system_user: usize,
pub connections: ConnectionsConfig,
pub html_footer_path: String,
pub stripe: Option<StripeConfig>,
pub manuals: ManualsConfig,
pub banned_data: Vec<StringBan>,
pub enable_user_ads: bool,
}Expand description
Configuration file
Fields§
§name: StringThe name of the app.
description: StringThe description of the app.
color: StringThe theme color 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.
no_track: Vec<String>A list of files (just their name, no full path) which are NOT updated to match the version built with the server binary.
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.
town_square: usizeThe ID of the “town square” community. This community is required to allow people to post from their profiles.
This community must have open write access.
town_square_forum: usizeThe ID of the town square forum community.
town_square_forum_topic: usizeThe ID of the topic within the town square forum community that users are prompted to post in by default. This should be some sort of “general” topic.
system_user: usizeThe ID of the “system” user which will send system mails to users.
connections: ConnectionsConfigThe path to the HTML footer file. The contents of this file are embedded
into every HTML template. They support access to template fields like {{ user }}.
stripe: Option<StripeConfig>§manuals: ManualsConfigThe relative paths to manuals.
banned_data: Vec<StringBan>A list of banned content in posts.
enable_user_ads: boolIf user ads are enabled.
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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