[chore](trx-client): update example config to include HTTP auth section
Update ClientConfig::example_toml() to explicitly include all HTTP auth config fields with their default values, so the --print-config output displays the complete auth configuration section. Also add #[allow(dead_code)] to session_ttl() method to suppress warning. The example config now shows: [frontends.http.auth] enabled = false tx_access_control_enabled = true session_ttl_min = 480 cookie_secure = false cookie_same_site = "Lax" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
@@ -206,6 +206,7 @@ impl Default for HttpAuthConfig {
|
||||
|
||||
impl HttpAuthConfig {
|
||||
/// Convert session TTL from minutes to Duration
|
||||
#[allow(dead_code)]
|
||||
pub fn session_ttl(&self) -> Duration {
|
||||
Duration::from_secs(self.session_ttl_min * 60)
|
||||
}
|
||||
@@ -366,7 +367,15 @@ impl ClientConfig {
|
||||
enabled: true,
|
||||
listen: IpAddr::from([127, 0, 0, 1]),
|
||||
port: 8080,
|
||||
auth: HttpAuthConfig::default(),
|
||||
auth: HttpAuthConfig {
|
||||
enabled: false,
|
||||
rx_passphrase: None,
|
||||
control_passphrase: None,
|
||||
tx_access_control_enabled: true,
|
||||
session_ttl_min: 480,
|
||||
cookie_secure: false,
|
||||
cookie_same_site: CookieSameSite::Lax,
|
||||
},
|
||||
},
|
||||
rigctl: RigctlFrontendConfig {
|
||||
enabled: false,
|
||||
|
||||
Reference in New Issue
Block a user