pub struct CorsRule {
pub allowed_headers: Option<String>,
pub allowed_methods: Option<String>,
pub allowed_origins: Option<String>,
pub exposed_headers: Option<String>,
pub max_age_in_seconds: Option<i32>,
}
Expand description
CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain
Fields§
§allowed_headers: Option<String>
The allowed headers.
allowed_methods: Option<String>
The allowed methods.
allowed_origins: Option<String>
The allowed origins.
exposed_headers: Option<String>
The exposed headers.
max_age_in_seconds: Option<i32>
The maximum age in seconds.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CorsRule
impl<'de> Deserialize<'de> for CorsRule
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 CorsRule
impl RefUnwindSafe for CorsRule
impl Send for CorsRule
impl Sync for CorsRule
impl Unpin for CorsRule
impl UnwindSafe for CorsRule
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