pub struct CorsMiddleware { /* private fields */ }
Expand description
CORS middleware
Implementations§
Source§impl CorsMiddleware
impl CorsMiddleware
pub fn new() -> Self
pub fn allow_origins(self, origins: Vec<String>) -> Self
pub fn allow_methods(self, methods: Vec<String>) -> Self
pub fn allow_headers(self, headers: Vec<String>) -> Self
Trait Implementations§
Source§impl Debug for CorsMiddleware
impl Debug for CorsMiddleware
Source§impl Default for CorsMiddleware
impl Default for CorsMiddleware
Source§impl Middleware for CorsMiddleware
impl Middleware for CorsMiddleware
Source§fn handle(&self, request: ElifRequest, next: Next) -> NextFuture<'static>
fn handle(&self, request: ElifRequest, next: Next) -> NextFuture<'static>
Handle the request and call the next middleware in the chain
Auto Trait Implementations§
impl Freeze for CorsMiddleware
impl RefUnwindSafe for CorsMiddleware
impl Send for CorsMiddleware
impl Sync for CorsMiddleware
impl Unpin for CorsMiddleware
impl UnwindSafe for CorsMiddleware
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