session cookie store init

This commit is contained in:
mtrx 2024-12-28 01:55:22 +01:00
parent b61c62a806
commit 7ba1605456
5 changed files with 869 additions and 381 deletions

View file

@ -4,7 +4,7 @@ use once_cell::sync::Lazy;
pub const ENV_PREFIX: &str = "CL_";
pub struct Config {
pub submit_token: String,
pub session_secret: String,
pub root_path: String,
pub username: String,
pub bind_port: String,
@ -65,7 +65,7 @@ fn load_config() -> Config {
}
Config {
submit_token: eval_conf_var("SUBMIT_TOKEN", true, None).unwrap(),
session_secret: eval_conf_var("SESSION_SECRET", true, None).unwrap(),
root_path: eval_conf_var("ROOT_PATH", false, Some("./content")).unwrap(),
username: eval_conf_var("USERNAME", true, None).unwrap(),
bind_port: eval_conf_var("BIND_PORT", false, Some("8000")).unwrap(),