Struct jormungandr_lib::interfaces::Cors
source · pub struct Cors {
pub allowed_origins: Vec<CorsOrigin>,
pub max_age_secs: Option<u64>,
pub allowed_headers: Vec<HeaderName>,
pub allowed_methods: Vec<HttpMethod>,
}
Fields§
§allowed_origins: Vec<CorsOrigin>
If none provided, echos request origin
max_age_secs: Option<u64>
If none provided, CORS responses won’t be cached
allowed_headers: Vec<HeaderName>
If none provided, the list is empty, and all preflight with a request header will be rejected.
allowed_methods: Vec<HttpMethod>
If none provided, the list is empty and all preflight requests will be rejected
Trait Implementations§
source§impl<'de> Deserialize<'de> for Cors
impl<'de> Deserialize<'de> for Cors
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
source§impl PartialEq<Cors> for Cors
impl PartialEq<Cors> for Cors
impl Eq for Cors
impl StructuralEq for Cors
impl StructuralPartialEq for Cors
Auto Trait Implementations§
impl RefUnwindSafe for Cors
impl Send for Cors
impl Sync for Cors
impl Unpin for Cors
impl UnwindSafe for Cors
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