pull/1978/head
Lucas Nogueira 4 months ago
parent c74db78ef2
commit b3cec50e47
No known key found for this signature in database
GPG Key ID: A05EE2227C581CD7

@ -114,8 +114,8 @@ pub fn run() {
headers.push( headers.push(
tiny_http::Header::from_bytes( tiny_http::Header::from_bytes(
&b"Set-Cookie"[..], &b"Set-Cookie"[..],
&format!("session-token=test-value; Secure; Path=/; Expires={expires_str}") format!("session-token=test-value; Secure; Path=/; Expires={expires_str}")
.as_bytes()[..], .as_bytes(),
) )
.unwrap(), .unwrap(),
); );

@ -43,15 +43,13 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
.open(&path)?; .open(&path)?;
let reader = BufReader::new(file); let reader = BufReader::new(file);
let store = CookieStoreMutex::load(path.clone(), reader).unwrap_or_else(|_e| { CookieStoreMutex::load(path.clone(), reader).unwrap_or_else(|_e| {
#[cfg(feature = "tracing")] #[cfg(feature = "tracing")]
tracing::warn!( tracing::warn!(
"failed to load cookie store: {_e}, falling back to empty store" "failed to load cookie store: {_e}, falling back to empty store"
); );
CookieStoreMutex::new(path, Default::default()) CookieStoreMutex::new(path, Default::default())
}); })
store
}; };
let state = Http { let state = Http {

Loading…
Cancel
Save