Enum tower_web::middleware::cors::AllowedOrigins [−][src]
pub enum AllowedOrigins {
Any {
allow_null: bool,
},
Origins(BTreeSet<HeaderValue>),
}Specifies which origins are allowed to access this resource
Variants
AnyAny origin is allowed
Fields of Any
allow_null: bool | Allowing a null origin is a separate setting, since it's risky to trust sources with a null origin, see https://tools.ietf.org/id/draft-abarth-origin-03.html#rfc.section.6 https://w3c.github.io/webappsec-cors-for-developers/ |
Origins(BTreeSet<HeaderValue>)Allow a specific set of origins
Trait Implementations
impl Debug for AllowedOrigins[src]
impl Debug for AllowedOriginsfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for AllowedOrigins[src]
impl Clone for AllowedOriginsfn clone(&self) -> AllowedOrigins[src]
fn clone(&self) -> AllowedOriginsReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Default for AllowedOrigins[src]
impl Default for AllowedOriginsimpl<A> FromIterator<A> for AllowedOrigins where
A: Into<HeaderValue>, [src]
impl<A> FromIterator<A> for AllowedOrigins where
A: Into<HeaderValue>, fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = A>, [src]
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = A>, Creates a value from an iterator. Read more
Auto Trait Implementations
impl Send for AllowedOrigins
impl Send for AllowedOriginsimpl Sync for AllowedOrigins
impl Sync for AllowedOrigins