Struct viz_core::middleware::csrf::Config
source · pub struct Config<S, G, V>(_);Available on crate feature
csrf only.Expand description
A configuration for CsrfMiddleware.
Implementations§
source§impl<S, G, V> Config<S, G, V>
impl<S, G, V> Config<S, G, V>
sourcepub const CSRF_TOKEN: &'static str = "x-csrf-token"
pub const CSRF_TOKEN: &'static str = "x-csrf-token"
The name of CSRF header.
sourcepub fn new(
store: Store,
ignored_methods: HashSet<Method>,
cookie_options: CookieOptions,
secret: S,
generate: G,
verify: V
) -> Self
pub fn new(
store: Store,
ignored_methods: HashSet<Method>,
cookie_options: CookieOptions,
secret: S,
generate: G,
verify: V
) -> Self
Creates a new configuration.
Trait Implementations§
source§impl<S, G, V> Cookieable for Config<S, G, V>
impl<S, G, V> Cookieable for Config<S, G, V>
source§fn options(&self) -> &CookieOptions
fn options(&self) -> &CookieOptions
Available on crate features
cookie-private and cookie-signed and cookie only.Gets the options of the cookie.
Available on crate features
cookie-private and cookie-signed and cookie only.Gets a cookie from the cookies.
Available on crate features
cookie-private and cookie-signed and cookie only.Deletes a cookie from the cookies.
Available on crate features
cookie-private and cookie-signed and cookie only.Sets a cookie from the cookies.