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

Any origin is allowed

Fields of Any

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/

Allow a specific set of origins

Trait Implementations

impl Debug for AllowedOrigins
[src]

Formats the value using the given formatter. Read more

impl Clone for AllowedOrigins
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for AllowedOrigins
[src]

Returns the "default value" for a type. Read more

impl<A> FromIterator<A> for AllowedOrigins where
    A: Into<HeaderValue>, 
[src]

Creates a value from an iterator. Read more

Auto Trait Implementations

impl Send for AllowedOrigins

impl Sync for AllowedOrigins