pub struct OriginLayer;Available on crate feature
router only.Expand description
A router layer that rejects state-changing cross-origin requests, as a defense against cross-site request forgery (CSRF).
Every request passing through it is checked with verify_origin.
The router’s sessions extension method registers it unless
SessionConfigBuilder::dangerous_disable_origin_verification
is set.
Implementations§
Source§impl OriginLayer
impl OriginLayer
Trait Implementations§
Source§impl Clone for OriginLayer
impl Clone for OriginLayer
Source§fn clone(&self) -> OriginLayer
fn clone(&self) -> OriginLayer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OriginLayer
Source§impl Debug for OriginLayer
impl Debug for OriginLayer
Source§impl Default for OriginLayer
impl Default for OriginLayer
Source§fn default() -> OriginLayer
fn default() -> OriginLayer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OriginLayer
impl RefUnwindSafe for OriginLayer
impl Send for OriginLayer
impl Sync for OriginLayer
impl Unpin for OriginLayer
impl UnsafeUnpin for OriginLayer
impl UnwindSafe for OriginLayer
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