pub struct CorsLayer;
Expand description
CORS layer for adding appropriate headers
Implementations§
Source§impl CorsLayer
impl CorsLayer
Sourcepub fn apply_cors_headers(headers: &mut HeaderMap)
pub fn apply_cors_headers(headers: &mut HeaderMap)
Apply CORS headers to a response
Sourcepub fn apply_cors_headers_for_origin(headers: &mut HeaderMap, origin: &str)
pub fn apply_cors_headers_for_origin(headers: &mut HeaderMap, origin: &str)
Apply restrictive CORS headers for a specific origin
Auto Trait Implementations§
impl Freeze for CorsLayer
impl RefUnwindSafe for CorsLayer
impl Send for CorsLayer
impl Sync for CorsLayer
impl Unpin for CorsLayer
impl UnwindSafe for CorsLayer
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