Fix trailing whitespace
All checks were successful
Test / test-frontend (pull_request) Successful in 23s
Test / lint-frontend (pull_request) Successful in 25s
Test / frontend-build (pull_request) Successful in 29s
Test / test (pull_request) Successful in 46s
Verify / verify-generated-code (pull_request) Successful in 59s
Verify / verify-openapi-spec (pull_request) Successful in 1m1s
Verify / verify-frontend-api-client (pull_request) Successful in 20s
Test / lint (pull_request) Successful in 1m3s

This commit is contained in:
GW_MC
2025-12-20 18:48:35 +08:00
parent 873b4a9d3a
commit dc7b70e039

View File

@@ -3,7 +3,9 @@ use std::net::IpAddr;
use config::{Config, ConfigError}; use config::{Config, ConfigError};
use tracing::warn; 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::{ use super::{
FromConfig, FromConfig,
@@ -94,7 +96,7 @@ impl FromConfig for ServerSettings {
.inspect(|is_secure| { .inspect(|is_secure| {
if !*is_secure { if !*is_secure {
warn!("Cookie 'secure' flag is disabled; this is not recommended in production environments."); warn!("Cookie 'secure' flag is disabled; this is not recommended in production environments.");
} }
}) })
.unwrap_or_else(|err| { .unwrap_or_else(|err| {
const DEFAULT_COOKIES_SECURE: bool = true; const DEFAULT_COOKIES_SECURE: bool = true;
@@ -125,9 +127,7 @@ impl FromConfig for ServerSettings {
cors: CORSSettings { cors: CORSSettings {
allowed_origins: vec![], allowed_origins: vec![],
}, },
cookies: CookiesSettings { cookies: CookiesSettings { secure: true },
secure: true,
},
} }
} }
} }