pub struct ServeOptions {
pub extra_origins: Vec<String>,
}Expand description
Per-listener serving options beyond the handler/auth pair.
Fields§
§extra_origins: Vec<String>Extra allowed browser Origin values (scheme://host[:port], exact
match) beyond the always-allowed loopback origins. A request from an
allowed origin is served with CORS response headers (and its
OPTIONS preflight answered), so a browser client on that origin can
actually read the reply; any other cross-site origin stays 403
(DNS-rebinding defense).
Trait Implementations§
Source§impl Clone for ServeOptions
impl Clone for ServeOptions
Source§fn clone(&self) -> ServeOptions
fn clone(&self) -> ServeOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for ServeOptions
impl Default for ServeOptions
Source§fn default() -> ServeOptions
fn default() -> ServeOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ServeOptions
impl RefUnwindSafe for ServeOptions
impl Send for ServeOptions
impl Sync for ServeOptions
impl Unpin for ServeOptions
impl UnsafeUnpin for ServeOptions
impl UnwindSafe for ServeOptions
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