pub struct Config {
pub allow_credentials: bool,
pub allowed_headers: AllowedHeaders,
pub allowed_methods: AllowedMethods,
pub allowed_origins: AllowedOrigins,
pub allow_private_network: bool,
pub max_age: Option<Duration>,
pub expose_headers: ExposeHeaders,
pub vary: Vary,
}Fields§
§allow_credentials: boolWhether to allow credentials in CORS requests
allowed_headers: AllowedHeadersWhich request headers can be sent in the actual request.
Controls the Access-Control-Allow-Headers response header.
allowed_methods: AllowedMethodsControls how to set the Access-Control-Allow-Methods response header.
allowed_origins: AllowedOriginsControls how to set the Access-Control-Allow-Origin response header.
allow_private_network: boolIf true, include the Access-Control-Allow-Private-Network response header.
max_age: Option<Duration>The maximum age of the CORS request in seconds
expose_headers: ExposeHeadersWhich headers are exposed to the client.
Controls the Access-Control-Expose-Headers response header.
vary: VaryWhich headers to set in the Vary response header
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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