pub struct CorsConfig {
pub allow_credentials: bool,
pub allow_headers: Vec<String>,
pub allow_methods: Vec<String>,
pub allow_origins: Vec<String>,
pub max_age: Option<usize>,
}Expand description
CORS configuration
Fields§
§allow_credentials: bool§allow_headers: Vec<String>§allow_methods: Vec<String>§allow_origins: Vec<String>§max_age: Option<usize>Implementations§
Source§impl CorsConfig
impl CorsConfig
pub fn build_layer(&self) -> CorsLayer
Trait Implementations§
Source§impl Clone for CorsConfig
impl Clone for CorsConfig
Source§fn clone(&self) -> CorsConfig
fn clone(&self) -> CorsConfig
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 CorsConfig
impl Debug for CorsConfig
Auto Trait Implementations§
impl Freeze for CorsConfig
impl RefUnwindSafe for CorsConfig
impl Send for CorsConfig
impl Sync for CorsConfig
impl Unpin for CorsConfig
impl UnwindSafe for CorsConfig
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