use std::collections::HashMap;

use serde::{Deserialize, Serialize};

/// Build information
use crate::{Environment, RateLimitConfig};

/// Security configuration
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SecurityConfig {
    /// CORS enabled
    pub cors_enabled: bool,
    /// Allowed origins for CORS
    pub cors_origins: Vec<String>,
    /// Security headers enabled
    pub security_headers: bool,
    /// CSRF protection enabled
    pub csrf_protection: bool,
    /// Rate limiting configuration
    pub rate_limiting: Option<RateLimitConfig>,
}

impl Default for SecurityConfig {
    fn default() -> Self {
        Self {
            cors_enabled: true,
            cors_origins: vec!["*".to_string()],
            security_headers: true,
            csrf_protection: true,
            rate_limiting: None,
        }
    }
}
