users: set a less restrictive domain on the cookie
Signed-off-by: ATechnoHazard <amolele@gmail.com>
This commit is contained in:
parent
ebe7bf4594
commit
9e7fc110ea
@ -1,8 +1,6 @@
|
||||
use jirachi::collision_resistant::Jirachi;
|
||||
use jirachi::Wishable;
|
||||
|
||||
|
||||
|
||||
pub fn get_random_id() -> String {
|
||||
let mut jirachi = Jirachi::new().unwrap();
|
||||
jirachi.wish().unwrap()
|
||||
|
@ -7,7 +7,8 @@ pub fn get_session_id(ck: &mut Cookies) -> String {
|
||||
Some(c) => c.value().to_string(),
|
||||
None => {
|
||||
let user_id = phonetic_key::get_random_id();
|
||||
ck.add_private(Cookie::new("session", user_id.clone()));
|
||||
let cookie = Cookie::build("session", user_id.clone()).domain("katb.in").permanent().finish();
|
||||
ck.add_private(cookie);
|
||||
user_id
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user