pub struct SecurityConfig {Show 15 fields
    pub enable_cors: bool,
    pub cors_allowed_origins: Vec<String>,
    pub cors_allowed_methods: Vec<String>,
    pub cors_allowed_headers: Vec<String>,
    pub enable_security_headers: bool,
    pub content_security_policy: Option<String>,
    pub enable_request_signing: bool,
    pub signing_secret: Option<String>,
    pub enable_ip_whitelist: bool,
    pub ip_whitelist: Vec<String>,
    pub enable_request_id: bool,
    pub max_request_size: usize,
    pub enable_input_validation: bool,
    pub enable_sql_injection_protection: bool,
    pub enable_xss_protection: bool,
}Expand description
Security configuration
Fields§
§enable_cors: boolEnable CORS
cors_allowed_origins: Vec<String>CORS allowed origins
cors_allowed_methods: Vec<String>CORS allowed methods
cors_allowed_headers: Vec<String>CORS allowed headers
enable_security_headers: boolEnable security headers
content_security_policy: Option<String>Content Security Policy
enable_request_signing: boolEnable request signing verification
signing_secret: Option<String>Secret key for request signing
enable_ip_whitelist: boolEnable IP whitelisting
ip_whitelist: Vec<String>Whitelisted IP addresses/ranges
enable_request_id: boolEnable request ID tracking
max_request_size: usizeMaximum request size for security
enable_input_validation: boolEnable input validation
enable_sql_injection_protection: boolSQL injection protection
enable_xss_protection: boolXSS protection
Trait Implementations§
Source§impl Clone for SecurityConfig
 
impl Clone for SecurityConfig
Source§fn clone(&self) -> SecurityConfig
 
fn clone(&self) -> SecurityConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for SecurityConfig
 
impl Debug for SecurityConfig
Auto Trait Implementations§
impl Freeze for SecurityConfig
impl RefUnwindSafe for SecurityConfig
impl Send for SecurityConfig
impl Sync for SecurityConfig
impl Unpin for SecurityConfig
impl UnwindSafe for SecurityConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more