pub struct Shield { /* private fields */ }Expand description
Apply common browser security headers on every response.
Implementations§
Source§impl Shield
impl Shield
pub fn new() -> Self
pub fn frame(self, value: &'static str) -> Self
pub fn frame_off(self) -> Self
pub fn content_type(self, value: &'static str) -> Self
pub fn content_type_off(self) -> Self
pub fn referrer(self, value: &'static str) -> Self
pub fn referrer_off(self) -> Self
pub fn cross_origin_opener(self, value: &'static str) -> Self
pub fn cross_origin_opener_off(self) -> Self
pub fn cross_origin_resource(self, value: &'static str) -> Self
pub fn cross_origin_resource_off(self) -> Self
pub fn dns_prefetch(self, value: &'static str) -> Self
pub fn dns_prefetch_off(self) -> Self
pub fn download_options(self, value: &'static str) -> Self
pub fn download_options_off(self) -> Self
pub fn permitted_cross_domain(self, value: &'static str) -> Self
pub fn permitted_cross_domain_off(self) -> Self
pub fn xss_protection(self, value: &'static str) -> Self
pub fn xss_protection_off(self) -> Self
Sourcepub fn csp(self, policy: &'static str) -> Self
pub fn csp(self, policy: &'static str) -> Self
Raw Content-Security-Policy (no default — set explicitly).
pub fn csp_off(self) -> Self
Trait Implementations§
Source§impl Plugin for Shield
impl Plugin for Shield
Source§fn id(&self) -> &'static str
fn id(&self) -> &'static str
Stable plugin identifier used for dependency checks and
crate::App::has_plugin. Read moreSource§fn meta(&self) -> PluginMeta
fn meta(&self) -> PluginMeta
Display name, description, and declared
PluginMeta::sdk version.Auto Trait Implementations§
impl Freeze for Shield
impl RefUnwindSafe for Shield
impl Send for Shield
impl Sync for Shield
impl Unpin for Shield
impl UnsafeUnpin for Shield
impl UnwindSafe for Shield
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