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 lw_host: String,
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.
lw_host: StringThe main public host of the littleweb server. Not used to check against banned hosts, so this host should be included in there as well.
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.