pub struct SecurityHeader {
pub referer_policy: RefererPolicy,
pub x_frame_options: XFrameOptions,
pub x_xss_protection: XXSSProtection,
pub cross_origin_opener_policy: CrossOriginOpenerPolicy,
pub content_security_policy: String,
pub strict_transport_security: Option<StrictTransportSecurity>,
}Fields§
§referer_policy: RefererPolicy§x_frame_options: XFrameOptions§x_xss_protection: XXSSProtection§cross_origin_opener_policy: CrossOriginOpenerPolicy§content_security_policy: String§strict_transport_security: Option<StrictTransportSecurity>Implementations§
source§impl SecurityHeader
impl SecurityHeader
sourcepub fn set_default_hsts(&mut self)
pub fn set_default_hsts(&mut self)
Set default HSTS to 1 year, includeSubDomains and preload.
max-age=31536000; includeSubDomains; preload
pub fn build(self) -> DefaultHeaders
Trait Implementations§
source§impl Clone for SecurityHeader
impl Clone for SecurityHeader
source§fn clone(&self) -> SecurityHeader
fn clone(&self) -> SecurityHeader
Returns a copy 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 SecurityHeader
impl Debug for SecurityHeader
Auto Trait Implementations§
impl Freeze for SecurityHeader
impl RefUnwindSafe for SecurityHeader
impl Send for SecurityHeader
impl Sync for SecurityHeader
impl Unpin for SecurityHeader
impl UnwindSafe for SecurityHeader
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)