big update in share links
This commit is contained in:
1 parent
e3ee6319b9
commit
fe5d00fcdd
27 files changed
+434
-176
No files matched your search
@@ -126,10 +126,6 @@ pub fn share_session_cookie(
|
||||
)
|
||||
}
|
||||
|
||||
pub fn clear_share_session_cookie(kind: &str, slug: &str) -> HeaderValue {
|
||||
clear_cookie(&share_session_cookie_name(kind, slug))
|
||||
}
|
||||
|
||||
pub fn client_key(headers: &HeaderMap) -> String {
|
||||
let forwarded_ip = header_ip(headers, "cf-connecting-ip")
|
||||
.or_else(|| header_ip(headers, "x-real-ip"))
|
||||
@@ -360,11 +356,6 @@ mod tests {
|
||||
assert!(value.contains("HttpOnly"));
|
||||
assert!(value.contains("Secure"));
|
||||
assert!(value.contains("SameSite=Lax"));
|
||||
|
||||
let cleared = clear_share_session_cookie("workspace", "private-space")
|
||||
.to_str()
|
||||
.unwrap();
|
||||
assert!(cleared.contains("Max-Age=0"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user