#[non_exhaustive]pub struct Config {Show 19 fields
pub server: Config,
pub database: Config,
pub tracing: Config,
pub cookie: Option<CookieConfig>,
pub security_headers: SecurityHeadersConfig,
pub cors: CorsConfig,
pub csrf: CsrfConfig,
pub rate_limit: RateLimitConfig,
pub session: SessionConfig,
pub job: JobConfig,
pub trusted_proxies: Vec<String>,
pub oauth: OAuthConfig,
pub email: EmailConfig,
pub template: TemplateConfig,
pub geolocation: GeolocationConfig,
pub storage: BucketConfig,
pub dns: DnsConfig,
pub apikey: ApiKeyConfig,
pub jwt: JwtConfig,
}Expand description
Top-level framework configuration.
Deserializes from a YAML file loaded by crate::config::load. All fields
use #[serde(default)], so any section omitted from the YAML file falls
back to the type’s own Default implementation.
Applications that need extra config fields can embed Config with
#[serde(flatten)] inside their own config struct.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.server: ConfigHTTP server bind address and shutdown behaviour.
database: Configlibsql database settings.
tracing: ConfigLog level, format, and optional Sentry integration.
Signed cookie secret and attributes. When absent, signed/private cookies are disabled.
security_headers: SecurityHeadersConfigHTTP security-header middleware settings.
cors: CorsConfigCORS policy.
csrf: CsrfConfigCSRF protection settings.
rate_limit: RateLimitConfigToken-bucket rate-limiting settings.
session: SessionConfigSession TTL, cookie name, fingerprint validation, touch interval, and per-user session limit.
job: JobConfigBackground job queue settings.
trusted_proxies: Vec<String>CIDR ranges of trusted reverse proxies used by crate::ip::ClientIpLayer.
Accepts any string parseable as ipnet::IpNet, e.g. "10.0.0.0/8".
oauth: OAuthConfigOAuth provider settings.
email: EmailConfigSMTP / email delivery settings.
template: TemplateConfigMiniJinja template engine settings.
geolocation: GeolocationConfigMaxMind GeoIP database path and settings.
storage: BucketConfigS3-compatible storage bucket settings.
dns: DnsConfigDNS verification settings.
apikey: ApiKeyConfigAPI key module settings.
jwt: JwtConfigJWT signing and validation settings.