mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-27 09:12:57 +01:00
Fix purge from other paths than root (#129)
Co-authored-by: Rob Ede <robjtede@icloud.com> Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
This commit is contained in:
parent
f970d90894
commit
936a116264
@ -2,6 +2,7 @@
|
||||
|
||||
## Unreleased - 2020-xx-xx
|
||||
* `Session::set_session` takes a `IntoIterator` instead of `Iterator`
|
||||
* Fix calls to `session.purge()` from paths other than the one specified in the cookie
|
||||
|
||||
|
||||
## 0.4.0 - 2020-09-11
|
||||
|
@ -136,6 +136,7 @@ impl CookieSessionInner {
|
||||
/// invalidates session cookie
|
||||
fn remove_cookie<B>(&self, res: &mut ServiceResponse<B>) -> Result<(), Error> {
|
||||
let mut cookie = Cookie::named(self.name.clone());
|
||||
cookie.set_path(self.path.clone());
|
||||
cookie.set_value("");
|
||||
cookie.set_max_age(Duration::zero());
|
||||
cookie.set_expires(OffsetDateTime::now_utc() - Duration::days(365));
|
||||
|
Loading…
Reference in New Issue
Block a user