pulseengine_mcp_security/
config.rs1use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Serialize, Deserialize)]
7#[serde(default)]
8pub struct SecurityConfig {
9 pub validate_requests: bool,
11 pub rate_limiting: bool,
13 pub max_requests_per_minute: u32,
15 pub cors_enabled: bool,
17 pub cors_origins: Vec<String>,
19}
20
21impl Default for SecurityConfig {
22 fn default() -> Self {
23 Self {
24 validate_requests: true,
25 rate_limiting: true,
26 max_requests_per_minute: 60,
27 cors_enabled: false,
28 cors_origins: vec!["*".to_string()],
29 }
30 }
31}
32
33#[cfg(test)]
34#[path = "config_tests.rs"]
35mod config_tests;