diff --git a/apps/api/src/configs/server.rs b/apps/api/src/configs/server.rs index 3623f56..cb18b94 100644 --- a/apps/api/src/configs/server.rs +++ b/apps/api/src/configs/server.rs @@ -3,7 +3,9 @@ use std::net::IpAddr; use config::{Config, ConfigError}; use tracing::warn; -use crate::configs::key::{SERVER_COOKIES_SECURE_KEY, SERVER_CORS_ALLOWED_ORIGINS_KEY, SERVER_SERVE_OPENAPI_KEY}; +use crate::configs::key::{ + SERVER_COOKIES_SECURE_KEY, SERVER_CORS_ALLOWED_ORIGINS_KEY, SERVER_SERVE_OPENAPI_KEY, +}; use super::{ FromConfig, @@ -94,7 +96,7 @@ impl FromConfig for ServerSettings { .inspect(|is_secure| { if !*is_secure { warn!("Cookie 'secure' flag is disabled; this is not recommended in production environments."); - } + } }) .unwrap_or_else(|err| { const DEFAULT_COOKIES_SECURE: bool = true; @@ -125,9 +127,7 @@ impl FromConfig for ServerSettings { cors: CORSSettings { allowed_origins: vec![], }, - cookies: CookiesSettings { - secure: true, - }, + cookies: CookiesSettings { secure: true }, } } -} \ No newline at end of file +}