pub struct SecurityHeadersConfig {
pub content_security_policy: Option<String>,
pub hsts_max_age: Option<u64>,
pub hsts_include_subdomains: bool,
pub x_frame_options: Option<String>,
pub x_content_type_options: Option<String>,
pub x_xss_protection: Option<String>,
pub referrer_policy: Option<String>,
pub enabled: bool,
}Expand description
Security headers configuration
Fields§
§content_security_policy: Option<String>Content-Security-Policy header
hsts_max_age: Option<u64>HSTS max age in seconds
hsts_include_subdomains: boolWhether to include subdomains in HSTS
x_frame_options: Option<String>X-Frame-Options header
x_content_type_options: Option<String>X-Content-Type-Options header
x_xss_protection: Option<String>X-XSS-Protection header
referrer_policy: Option<String>Referrer-Policy header
enabled: boolWhether security headers are enabled
Trait Implementations§
Source§impl Clone for SecurityHeadersConfig
impl Clone for SecurityHeadersConfig
Source§fn clone(&self) -> SecurityHeadersConfig
fn clone(&self) -> SecurityHeadersConfig
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 SecurityHeadersConfig
impl Debug for SecurityHeadersConfig
Auto Trait Implementations§
impl Freeze for SecurityHeadersConfig
impl RefUnwindSafe for SecurityHeadersConfig
impl Send for SecurityHeadersConfig
impl Sync for SecurityHeadersConfig
impl Unpin for SecurityHeadersConfig
impl UnsafeUnpin for SecurityHeadersConfig
impl UnwindSafe for SecurityHeadersConfig
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