pub enum CorsConfig {
AllowAll,
AllowOrigins(Vec<String>),
LocalOnly,
}Expand description
CORS configuration for the web server.
Variants§
AllowAll
Allow all origins (development mode).
AllowOrigins(Vec<String>)
Allow specific origins (production mode).
LocalOnly
Restrict to local-only access.
Accepts localhost, 127.0.0.1, ::1, tauri.localhost,
and Tauri custom schemes (tauri://localhost, asset://localhost).
This is the default for both the web server and the proxy.
Trait Implementations§
Source§impl Clone for CorsConfig
impl Clone for CorsConfig
Source§fn clone(&self) -> CorsConfig
fn clone(&self) -> CorsConfig
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 Debug for CorsConfig
impl Debug for CorsConfig
Source§impl Default for CorsConfig
impl Default for CorsConfig
Source§fn default() -> CorsConfig
fn default() -> CorsConfig
Returns the “default value” for a type. Read more
Source§impl PartialEq for CorsConfig
impl PartialEq for CorsConfig
Source§fn eq(&self, other: &CorsConfig) -> bool
fn eq(&self, other: &CorsConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CorsConfig
impl StructuralPartialEq for CorsConfig
Auto Trait Implementations§
impl Freeze for CorsConfig
impl RefUnwindSafe for CorsConfig
impl Send for CorsConfig
impl Sync for CorsConfig
impl Unpin for CorsConfig
impl UnsafeUnpin for CorsConfig
impl UnwindSafe for CorsConfig
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