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(
tiny_http::Header::from_bytes(
&b"Set-Cookie"[..],
&format!("session-token=test-value; Secure; Path=/; Expires={expires_str}")
.as_bytes()[..],
format!("session-token=test-value; Secure; Path=/; Expires={expires_str}")
.as_bytes(),
)
.unwrap(),
);

@ -43,15 +43,13 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
.open(&path)?;
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")]
tracing::warn!(
"failed to load cookie store: {_e}, falling back to empty store"
);
CookieStoreMutex::new(path, Default::default())
});
store
})
};
let state = Http {

Loading…
Cancel
Save