pub mod server {
pub const DEFAULT_HOST: &str = "127.0.0.1";
pub const DEFAULT_PORT: u16 = 8080;
pub const DEFAULT_REQUEST_TIMEOUT_SECS: u64 = 30;
}
pub mod timeout {
pub const DEFAULT_TIMEOUT_SECS: u64 = 30;
pub const UPLOAD_TIMEOUT_SECS: u64 = 300;
pub const EXPORT_TIMEOUT_SECS: u64 = 120;
}
pub mod api_key {
pub const DEFAULT_MAX_ATTEMPTS: u32 = 5;
pub const DEFAULT_LOCKOUT_DURATION_SECS: u64 = 900;
pub const MIN_PREFIX_LENGTH: usize = 1;
}
pub mod security_headers {
pub const CONTENT_TYPE_OPTIONS: &str = "nosniff";
pub const FRAME_OPTIONS: &str = "DENY";
pub const XSS_PROTECTION: &str = "1; mode=block";
pub const CACHE_CONTROL: &str = "no-store, no-cache, must-revalidate";
pub const CONTENT_SECURITY_POLICY: &str =
"default-src 'self'; script-src 'self'; style-src 'self'";
pub const STRICT_TRANSPORT_SECURITY: &str = "max-age=31536000; includeSubDomains; preload";
pub const REFERRER_POLICY: &str = "strict-origin-when-cross-origin";
pub const PERMISSIONS_POLICY: &str = "geolocation=(), microphone=(), camera=()";
}
pub mod jwt {
pub const MIN_SECRET_LENGTH: usize = 32;
pub const DEFAULT_EXPIRATION_SECS: u64 = 3600;
}
pub mod api {
pub const DEFAULT_PREFIX: &str = "/api";
pub const DEFAULT_VERSION: &str = "v1";
}
pub mod cache {
pub const DEFAULT_TTL_SECS: u64 = 300;
pub const DEFAULT_MAX_ITEMS: usize = 10_000;
pub const DEFAULT_ENABLED: bool = true;
pub const DEFAULT_TRACK_STATS: bool = true;
}