docs: clear less
ZhenYi committed
Modified lib/config/src/redis.rs lib/config/src/redis.rs +0 −5 View lib/config/src/redis.rs
@@ -34,11 +34,6 @@
3434 pub url: Option<String>,
3535 pub mode: Option<RedisMode>,
3636 pub database: Option<u16>,
37 /// Number of multiplexed connections to open. Defaults to 8.
38 ///
39 /// In cluster mode every connection keeps its own links to the cluster
40 /// nodes it touches, so the total socket count scales with
41 /// `pool_size × nodes`; tune accordingly for large clusters.
4237 pub pool_size: Option<usize>,
4338 pub connection_timeout_secs: Option<u64>,
4439 pub username: Option<String>,
Modified lib/config/src/session.rs lib/config/src/session.rs +1 −24 View lib/config/src/session.rs
@@ -18,16 +18,7 @@
1818 None,
1919}
2020
21/// Session and session-cookie configuration. Every field is optional; unset
22/// fields keep the `axum_session` defaults.
23///
24/// Production notes:
25/// - Set `cookie_secure` to `true` when serving over TLS; it is also required
26/// for `cookie_same_site = none`.
27/// - `key` and `database_key` must be base64 encodings of at least 64 random
28/// bytes (32 signing + 32 encryption).
29/// - `table_name` namespaces the Redis keys (`{table_name}:{session_id}`); it
30/// must be non-empty and must not contain glob characters (`*?[]\`).
21
3122#[derive(Debug, Clone, Default, Serialize, Deserialize)]
3223#[serde(default)]
3324pub struct SessionConfig {
@@ -36,30 +27,16 @@
3627 pub cookie_domain: Option<String>,
3728 pub cookie_path: Option<String>,
3829 pub cookie_http_only: Option<bool>,
39 /// Mark the cookie `Secure`. Must be `true` over TLS and when
40 /// `cookie_same_site` is `none`.
4130 pub cookie_secure: Option<bool>,
4231 pub cookie_same_site: Option<SameSite>,
43 /// Cookie max-age in seconds; must be positive (a zero max-age makes
44 /// browsers drop the cookie immediately).
4532 pub cookie_max_age_secs: Option<i64>,
4633 pub cookie_prefix_host: Option<bool>,
4734 pub cookie_encode_ip_and_user_agent: Option<bool>,
48 /// Session validity in seconds; must be positive.
4935 pub lifespan_secs: Option<i64>,
50 /// Long-term ("remember me") validity in seconds; must be positive and at
51 /// least as large as `lifespan_secs`.
5236 pub max_lifespan_secs: Option<i64>,
53 /// How long an untouched session stays cached in memory; `0` keeps it in
54 /// memory indefinitely.
5537 pub memory_lifespan_secs: Option<i64>,
56 /// Redis key namespace (`{table_name}:{session_id}`); must be non-empty
57 /// and free of glob characters.
5838 pub table_name: Option<String>,
59 /// Cookie signing/encryption key, base64 of at least 64 random bytes.
6039 pub key: Option<String>,
61 /// Key encrypting session data at rest in Redis, base64 of at least 64
62 /// random bytes.
6340 pub database_key: Option<String>,
6441 pub always_save: Option<bool>,
6542 pub db_update_interval_secs: Option<i64>,