pub struct CorsConfig {
pub enabled: bool,
pub allow_origins: Vec<String>,
pub allow_methods: Vec<String>,
pub allow_headers: Vec<String>,
pub allow_credentials: bool,
pub max_age: u64,
}Expand description
The resolved CORS configuration: _compute_cors_config’s returned
state, with the SecurityConfig CORS field defaults.
Fields§
§enabled: boolThe reference enable_cors (false by default): a disabled switch
means no CORS headers on any response.
allow_origins: Vec<String>The allowed origins; "*" is the wildcard origin.
allow_methods: Vec<String>§allow_headers: Vec<String>§allow_credentials: bool§max_age: u64The reference cors_max_age (600 by default): the preflight
cache lifetime the Access-Control-Max-Age header carries.
Trait Implementations§
Source§impl Clone for CorsConfig
impl Clone for CorsConfig
Source§impl Debug for CorsConfig
impl Debug for CorsConfig
Source§impl Default for CorsConfig
impl Default for CorsConfig
impl Eq for CorsConfig
Source§impl PartialEq for CorsConfig
impl PartialEq for CorsConfig
impl StructuralPartialEq 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 UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.