pub struct Cors {
pub allow_all: bool,
pub allow_origins: Vec<String>,
pub allow_methods: Vec<String>,
pub allow_headers: Vec<String>,
pub allow_credentials: bool,
pub expose_headers: Vec<String>,
pub max_age: String,
}
Fields§
§allow_all: bool
§allow_origins: Vec<String>
§allow_methods: Vec<String>
§allow_headers: Vec<String>
§allow_credentials: bool
§expose_headers: Vec<String>
§max_age: String
Implementations§
Source§impl Cors
impl Cors
pub const MAX_AGE: &'static str = "86400"
pub fn get_vary_header_value() -> String
pub fn allow_all(request: &Request) -> Result<Vec<Header>, Error>
pub fn _process(request: &Request, cors: &Cors) -> Result<Vec<Header>, Error>
pub fn process_using_default_config( request: &Request, ) -> Result<Vec<Header>, Error>
pub fn get_headers(request: &Request) -> Vec<Header>
Trait Implementations§
impl Eq for Cors
impl StructuralPartialEq for Cors
Auto Trait Implementations§
impl Freeze for Cors
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