patch tags
This commit is contained in:
@@ -11,6 +11,8 @@ pub struct AppConfig {
|
||||
pub jwt_issuer: String,
|
||||
pub jwt_audience: String,
|
||||
pub jwt_expiry_minutes: i64,
|
||||
pub download_token_audience: String,
|
||||
pub download_token_expiry_minutes: i64,
|
||||
pub refresh_token_expiry_days: i64,
|
||||
pub refresh_cookie_secure: bool,
|
||||
pub refresh_cookie_domain: Option<String>,
|
||||
@@ -40,6 +42,12 @@ impl AppConfig {
|
||||
.unwrap_or_else(|_| "60".to_string())
|
||||
.parse()
|
||||
.context("JWT_EXPIRY_MINUTES must be an integer")?;
|
||||
let download_token_audience = env::var("DOWNLOAD_TOKEN_AUDIENCE")
|
||||
.unwrap_or_else(|_| "paperless-neo-download".to_string());
|
||||
let download_token_expiry_minutes = env::var("DOWNLOAD_TOKEN_EXPIRY_MINUTES")
|
||||
.unwrap_or_else(|_| "60".to_string())
|
||||
.parse()
|
||||
.context("DOWNLOAD_TOKEN_EXPIRY_MINUTES must be an integer")?;
|
||||
let refresh_token_expiry_days = env::var("REFRESH_TOKEN_EXPIRY_DAYS")
|
||||
.unwrap_or_else(|_| "30".to_string())
|
||||
.parse()
|
||||
@@ -65,6 +73,8 @@ impl AppConfig {
|
||||
jwt_issuer,
|
||||
jwt_audience,
|
||||
jwt_expiry_minutes,
|
||||
download_token_audience,
|
||||
download_token_expiry_minutes,
|
||||
refresh_token_expiry_days,
|
||||
refresh_cookie_secure,
|
||||
refresh_cookie_domain,
|
||||
|
||||
Reference in New Issue
Block a user