feat: fix sticky cookie directive. remove httponly
This commit is contained in:
parent
7234d3f399
commit
71084ae872
1 changed files with 3 additions and 3 deletions
|
|
@ -134,7 +134,7 @@ impl TryInto<String> for StickyCookie {
|
||||||
let max_age = info.expires - Utc::now().timestamp();
|
let max_age = info.expires - Utc::now().timestamp();
|
||||||
|
|
||||||
Ok(format!(
|
Ok(format!(
|
||||||
"{}={}; expires={}; Max-Age={}; path={}; domain={}; HttpOnly",
|
"{}={}; expires={}; Max-Age={}; path={}; domain={}",
|
||||||
self.value.name, self.value.value, exp_str, max_age, info.path, info.domain
|
self.value.name, self.value.value, exp_str, max_age, info.path, info.domain
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
@ -184,7 +184,7 @@ mod tests {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
sc_string.unwrap(),
|
sc_string.unwrap(),
|
||||||
format!(
|
format!(
|
||||||
"{}=test_value; expires={}; Max-Age={}; path=/path; domain=example.com; HttpOnly",
|
"{}=test_value; expires={}; Max-Age={}; path=/path; domain=example.com",
|
||||||
STICKY_COOKIE_NAME, expires_date_string, 100
|
STICKY_COOKIE_NAME, expires_date_string, 100
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
@ -208,7 +208,7 @@ mod tests {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
sc_string.unwrap(),
|
sc_string.unwrap(),
|
||||||
format!(
|
format!(
|
||||||
"{}=test_value; expires=Thu, 08-Jun-2023 10:46:13 GMT; Max-Age={}; path=/path; domain=example.com; HttpOnly",
|
"{}=test_value; expires=Thu, 08-Jun-2023 10:46:13 GMT; Max-Age={}; path=/path; domain=example.com",
|
||||||
STICKY_COOKIE_NAME, max_age
|
STICKY_COOKIE_NAME, max_age
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue