pub struct AxumCors {
pub origin: Option<String>,
pub methods: Option<String>,
pub headers: Option<String>,
pub expose: Option<String>,
pub credentials: Option<String>,
pub max_age: Option<String>,
}Expand description
CORS 配置,字段为各响应头的简短映射,None 表示不输出该响应头。
Fields§
§origin: Option<String>access-control-allow-origin
methods: Option<String>access-control-allow-methods
headers: Option<String>access-control-allow-headers
expose: Option<String>access-control-expose-headers
credentials: Option<String>access-control-allow-credentials
max_age: Option<String>access-control-max-age
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AxumCors
impl RefUnwindSafe for AxumCors
impl Send for AxumCors
impl Sync for AxumCors
impl Unpin for AxumCors
impl UnsafeUnpin for AxumCors
impl UnwindSafe for AxumCors
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