pub enum CrossOriginEmbedderPolicy {
UnsafeNone,
RequireCorp,
Credentialless,
}Expand description
Cross-Origin-Embedder-Policy (COEP) header value.
COEP prevents a document from loading any cross-origin resources that don’t explicitly grant the document permission to be loaded.
§Examples
use http_security_headers::CrossOriginEmbedderPolicy;
let policy = CrossOriginEmbedderPolicy::RequireCorp;
let policy = CrossOriginEmbedderPolicy::UnsafeNone;Variants§
UnsafeNone
This is the default value and allows the document to fetch cross-origin resources without giving explicit permission through the CORS protocol or CORP header.
RequireCorp
A document can only load resources from the same origin, or resources explicitly marked as loadable from another origin.
Credentialless
A more permissive variant of require-corp that reports (but doesn’t block)
violations and allows cross-origin resources without CORP headers to load.
Implementations§
Trait Implementations§
Source§impl Clone for CrossOriginEmbedderPolicy
impl Clone for CrossOriginEmbedderPolicy
Source§fn clone(&self) -> CrossOriginEmbedderPolicy
fn clone(&self) -> CrossOriginEmbedderPolicy
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 CrossOriginEmbedderPolicy
impl Debug for CrossOriginEmbedderPolicy
Source§impl Display for CrossOriginEmbedderPolicy
impl Display for CrossOriginEmbedderPolicy
impl Copy for CrossOriginEmbedderPolicy
impl Eq for CrossOriginEmbedderPolicy
impl StructuralPartialEq for CrossOriginEmbedderPolicy
Auto Trait Implementations§
impl Freeze for CrossOriginEmbedderPolicy
impl RefUnwindSafe for CrossOriginEmbedderPolicy
impl Send for CrossOriginEmbedderPolicy
impl Sync for CrossOriginEmbedderPolicy
impl Unpin for CrossOriginEmbedderPolicy
impl UnwindSafe for CrossOriginEmbedderPolicy
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