Skip to content

Commit

Permalink
Change insert to append
Browse files Browse the repository at this point in the history
  • Loading branch information
sunhuachuang committed Nov 30, 2022
1 parent 7d797f1 commit 914e009
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/session.rs
Expand Up @@ -345,7 +345,7 @@ where

let removal_cookie = session_layer.build_removal_cookie();

response.headers_mut().insert(
response.headers_mut().append(
SET_COOKIE,
HeaderValue::from_str(&removal_cookie.to_string()).unwrap(),
);
Expand All @@ -360,7 +360,7 @@ where
match session_layer.store.store_session(session).await {
Ok(Some(cookie_value)) => {
let cookie = session_layer.build_cookie(cookie_value);
response.headers_mut().insert(
response.headers_mut().append(
SET_COOKIE,
HeaderValue::from_str(&cookie.to_string()).unwrap(),
);
Expand Down

0 comments on commit 914e009

Please sign in to comment.