pub struct CorsSection {
pub origins: Vec<String>,
pub methods: Vec<String>,
pub headers: Vec<String>,
pub expose_headers: Vec<String>,
pub allow_credentials: bool,
pub max_age: u32,
}Expand description
CORS (Cross-Origin Resource Sharing) section.
Fields§
§origins: Vec<String>Allowed origins. Default: [“*”].
methods: Vec<String>Allowed methods. Default: GET, POST, PUT, DELETE, PATCH, OPTIONS.
headers: Vec<String>Allowed headers. Default: Content-Type, Authorization.
expose_headers: Vec<String>Response headers exposed to the client. Default: empty.
allow_credentials: boolAllow credentials. Default: false.
max_age: u32Preflight cache max-age in seconds. Default: 86400.
Trait Implementations§
Source§impl Clone for CorsSection
impl Clone for CorsSection
Source§fn clone(&self) -> CorsSection
fn clone(&self) -> CorsSection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CorsSection
impl Debug for CorsSection
Source§impl Default for CorsSection
impl Default for CorsSection
Source§impl<'de> Deserialize<'de> for CorsSection
impl<'de> Deserialize<'de> for CorsSection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CorsSection
impl RefUnwindSafe for CorsSection
impl Send for CorsSection
impl Sync for CorsSection
impl Unpin for CorsSection
impl UnsafeUnpin for CorsSection
impl UnwindSafe for CorsSection
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