pub struct RuntimeCorsPolicy {
pub enabled: bool,
pub allowed_origins: CorsAllowedOrigins,
pub allow_credentials: bool,
pub max_age_secs: u64,
}Expand description
Product-neutral runtime CORS policy.
Fields§
§enabled: boolWhether CORS processing is enabled.
allowed_origins: CorsAllowedOriginsOrigins accepted when CORS processing is enabled.
allow_credentials: boolWhether credentials are allowed.
max_age_secs: u64Browser preflight cache duration.
Implementations§
Source§impl RuntimeCorsPolicy
impl RuntimeCorsPolicy
Sourcepub fn enforces_requests(&self) -> bool
pub fn enforces_requests(&self) -> bool
Returns whether requests should be actively checked.
Sourcepub fn allows_origin(&self, origin: &str) -> bool
pub fn allows_origin(&self, origin: &str) -> bool
Returns whether a normalized origin is allowed.
Sourcepub fn sends_wildcard_origin(&self) -> bool
pub fn sends_wildcard_origin(&self) -> bool
Returns whether responses should use Access-Control-Allow-Origin: *.
Trait Implementations§
Source§impl Clone for RuntimeCorsPolicy
impl Clone for RuntimeCorsPolicy
Source§fn clone(&self) -> RuntimeCorsPolicy
fn clone(&self) -> RuntimeCorsPolicy
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 moreSource§impl Debug for RuntimeCorsPolicy
impl Debug for RuntimeCorsPolicy
Source§impl PartialEq for RuntimeCorsPolicy
impl PartialEq for RuntimeCorsPolicy
Source§fn eq(&self, other: &RuntimeCorsPolicy) -> bool
fn eq(&self, other: &RuntimeCorsPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for RuntimeCorsPolicy
impl StructuralPartialEq for RuntimeCorsPolicy
Auto Trait Implementations§
impl Freeze for RuntimeCorsPolicy
impl RefUnwindSafe for RuntimeCorsPolicy
impl Send for RuntimeCorsPolicy
impl Sync for RuntimeCorsPolicy
impl Unpin for RuntimeCorsPolicy
impl UnsafeUnpin for RuntimeCorsPolicy
impl UnwindSafe for RuntimeCorsPolicy
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more