1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-26 18:37:41 +02:00

set same-site attribute when clearing session cookie (#284)

fixes #282
This commit is contained in:
Rob Ede
2022-09-11 21:11:33 +01:00
committed by GitHub
parent 9a3b410409
commit eb3660a772
2 changed files with 5 additions and 1 deletions

View File

@ -444,7 +444,8 @@ fn delete_session_cookie(
) -> Result<(), anyhow::Error> {
let removal_cookie = Cookie::build(config.name.clone(), "")
.path(config.path.clone())
.http_only(config.http_only);
.http_only(config.http_only)
.same_site(config.same_site);
let mut removal_cookie = if let Some(ref domain) = config.domain {
removal_cookie.domain(domain)