|
|
|
@ -126,7 +126,7 @@ where |
|
|
|
|
{ |
|
|
|
|
type Error = (); |
|
|
|
|
|
|
|
|
|
async fn from_request(request: &'r Request<'_>) -> Outcome<Self, (Status, Self::Error), ()> { |
|
|
|
|
async fn from_request(request: &'r Request<'_>) -> Outcome<Self, (Status, Self::Error), Status> { |
|
|
|
|
let store = request.guard::<&State<SessionStore<D>>>().await.unwrap(); |
|
|
|
|
Outcome::Success(Session { |
|
|
|
|
id: request.local_cache(|| { |
|
|
|
@ -321,9 +321,9 @@ where |
|
|
|
|
|
|
|
|
|
if !session.0.is_empty() { |
|
|
|
|
response.adjoin_header( |
|
|
|
|
Cookie::build(self.config.cookie_name.clone(), session.to_string()) |
|
|
|
|
Cookie::build((self.config.cookie_name.clone(), session.to_string())) |
|
|
|
|
.path("/") |
|
|
|
|
.finish(), |
|
|
|
|
.build(), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|