pub struct CorsConfig {
pub enabled: bool,
pub allow_origin: String,
pub allow_credentials: bool,
pub extra_allow_headers: Vec<String>,
pub extra_expose_headers: Vec<String>,
pub max_age: u64,
}Expand description
Cross-origin resource sharing settings (tus clients in browsers).
Fields§
§enabled: boolWhen false, no CORS headers are added.
allow_origin: StringAccess-Control-Allow-Origin value (e.g. "*" or "https://example.com").
allow_credentials: boolAccess-Control-Allow-Credentials.
extra_allow_headers: Vec<String>Extra header names merged into Access-Control-Allow-Headers (tus defaults are always included).
extra_expose_headers: Vec<String>Extra header names merged into Access-Control-Expose-Headers (tus defaults are always included).
max_age: u64Access-Control-Max-Age for preflight (seconds).
Trait Implementations§
Source§impl Clone for CorsConfig
impl Clone for CorsConfig
Source§fn clone(&self) -> CorsConfig
fn clone(&self) -> CorsConfig
Returns a duplicate 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 CorsConfig
impl Debug for CorsConfig
Auto Trait Implementations§
impl Freeze for CorsConfig
impl RefUnwindSafe for CorsConfig
impl Send for CorsConfig
impl Sync for CorsConfig
impl Unpin for CorsConfig
impl UnsafeUnpin for CorsConfig
impl UnwindSafe for CorsConfig
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