admin_config/
session_config.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Serialize, Deserialize)]
4pub struct SessionConfig {
5 pub secret_key: String,
7 pub max_age: u64,
9 pub http_only: bool,
11 pub secure: bool,
13 pub cookie_path: String,
15 pub cookie_domain: Option<String>,
17}
18
19impl Default for SessionConfig {
20 fn default() -> Self {
21 Self {
22 secret_key: "".to_string(),
23 max_age: 86400,
24 http_only: true,
25 secure: false,
26 cookie_path: "/".to_string(),
27 cookie_domain: None,
28 }
29 }
30}