mirror of
https://github.com/actix/actix-web.git
synced 2024-11-03 15:39:50 +00:00
set sessio name
This commit is contained in:
parent
b714e1f4ce
commit
27b0dfd761
1 changed files with 7 additions and 0 deletions
|
@ -401,6 +401,7 @@ impl<S> SessionBackend<S> for CookieSessionBackend {
|
||||||
/// # fn main() {
|
/// # fn main() {
|
||||||
/// let backend: CookieSessionBackend = CookieSessionBackend::build(&[0; 32])
|
/// let backend: CookieSessionBackend = CookieSessionBackend::build(&[0; 32])
|
||||||
/// .domain("www.rust-lang.org")
|
/// .domain("www.rust-lang.org")
|
||||||
|
/// .name("actix_session")
|
||||||
/// .path("/")
|
/// .path("/")
|
||||||
/// .secure(true)
|
/// .secure(true)
|
||||||
/// .finish();
|
/// .finish();
|
||||||
|
@ -420,6 +421,12 @@ impl CookieSessionBackendBuilder {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Sets the `name` field in the session cookie being built.
|
||||||
|
pub fn name<S: Into<String>>(mut self, value: S) -> CookieSessionBackendBuilder {
|
||||||
|
self.0.name = value.into();
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
/// Sets the `domain` field in the session cookie being built.
|
/// Sets the `domain` field in the session cookie being built.
|
||||||
pub fn domain<S: Into<String>>(mut self, value: S) -> CookieSessionBackendBuilder {
|
pub fn domain<S: Into<String>>(mut self, value: S) -> CookieSessionBackendBuilder {
|
||||||
self.0.domain = Some(value.into());
|
self.0.domain = Some(value.into());
|
||||||
|
|
Loading…
Reference in a new issue