pub struct ConfigBuilder { /* private fields */ }Expand description
Assembles a Config. Created with Config::builder.
Implementations§
Source§impl ConfigBuilder
impl ConfigBuilder
Sourcepub fn token_store(self, token_store: impl TokenStore + 'static) -> Self
pub fn token_store(self, token_store: impl TokenStore + 'static) -> Self
Overrides the TokenStore carrying the session token between the
client and the server.
Sourcepub fn trust_origin(self, origin: impl Into<String>) -> Self
Available on crate feature router only.
pub fn trust_origin(self, origin: impl Into<String>) -> Self
router only.Trusts origin to send state-changing cross-origin requests, exempting
it from verify_origin.
The value is compared against the request’s Origin header, so pass
the full serialized origin: scheme, host, and any non-default port
("https://accounts.example.com"), with no trailing slash.
Sourcepub fn dangerous_disable_origin_verification(self) -> Self
Available on crate feature router only.
pub fn dangerous_disable_origin_verification(self) -> Self
router only.Disables the OriginLayer that the router’s
sessions extension method registers.
Without the layer, nothing rejects state-changing cross-origin requests; only disable it if the application enforces its own defense against cross-site request forgery.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ConfigBuilder
impl !UnwindSafe for ConfigBuilder
impl Freeze for ConfigBuilder
impl Send for ConfigBuilder
impl Sync for ConfigBuilder
impl Unpin for ConfigBuilder
impl UnsafeUnpin for ConfigBuilder
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