Struct tower_http::cors::AllowCredentials
source · pub struct AllowCredentials(_);
Available on crate feature
cors
only.Expand description
Holds configuration for how to set the Access-Control-Allow-Credentials
header.
See CorsLayer::allow_credentials
for more details.
Implementations§
source§impl AllowCredentials
impl AllowCredentials
sourcepub fn yes() -> Self
pub fn yes() -> Self
Allow credentials for all requests
See CorsLayer::allow_credentials
for more details.
sourcepub fn predicate<F>(f: F) -> Selfwhere
F: Fn(&HeaderValue, &RequestParts) -> bool + Send + Sync + 'static,
pub fn predicate<F>(f: F) -> Selfwhere
F: Fn(&HeaderValue, &RequestParts) -> bool + Send + Sync + 'static,
Allow credentials for some requests, based on a given predicate
See CorsLayer::allow_credentials
for more details.
Trait Implementations§
source§impl Clone for AllowCredentials
impl Clone for AllowCredentials
source§fn clone(&self) -> AllowCredentials
fn clone(&self) -> AllowCredentials
Returns a copy 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 AllowCredentials
impl Debug for AllowCredentials
source§impl Default for AllowCredentials
impl Default for AllowCredentials
source§fn default() -> AllowCredentials
fn default() -> AllowCredentials
Returns the “default value” for a type. Read more