pub struct CorsRule {
pub allowed_origins: Vec<String>,
pub allowed_methods: Vec<String>,
pub allowed_headers: Vec<String>,
pub expose_headers: Vec<String>,
pub max_age_seconds: Option<u32>,
pub id: Option<String>,
}Expand description
1つの CORS rule。AWS S3 CORSRule element に対応する。
id は rule の human-readable label (operator が trace 用に付ける)。
expose_headers はレスポンスに含まれる header 名 — preflight ではなく
actual response で使われる (Access-Control-Expose-Headers)。
max_age_seconds は browser 側 preflight cache TTL。
Fields§
§allowed_origins: Vec<String>"*" for any origin, or exact origin string like
"https://example.com". Multiple values are evaluated as OR within
this rule.
allowed_methods: Vec<String>Uppercase HTTP verbs: "GET", "PUT", "POST", "DELETE",
"HEAD". AWS S3 only allows this set; we don’t validate (caller
is responsible).
allowed_headers: Vec<String>"*" or specific header names. Matched case-insensitively against
Access-Control-Request-Headers from the preflight request.
expose_headers: Vec<String>Header names to expose in the actual response via
Access-Control-Expose-Headers. Empty = no header.
max_age_seconds: Option<u32>Access-Control-Max-Age value (browser preflight cache TTL).
None = header omitted.
id: Option<String>Optional rule identifier (operator-supplied label).
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>,
impl Eq for CorsRule
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 UnsafeUnpin for CorsRule
impl UnwindSafe for CorsRule
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.