pub struct CorsRule {
pub allowed_origins: String,
pub allowed_methods: String,
pub allowed_headers: String,
pub exposed_headers: String,
pub max_age_in_seconds: i64,
}
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_origins: String
The origin domains that are permitted to make a request against the storage service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard character ‘*’ to allow all origin domains to make requests via CORS.
allowed_methods: String
The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated)
allowed_headers: String
the request headers that the origin domain may specify on the CORS request.
exposed_headers: String
The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer
max_age_in_seconds: i64
The maximum amount time that a browser should cache the preflight OPTIONS request.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for CorsRule
impl<'de> Deserialize<'de> for CorsRule
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CorsRule, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CorsRule, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl Serialize for CorsRule
impl Serialize for CorsRule
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for CorsRule
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)