···11CREATE TABLE instance_settings (
22 key TEXT PRIMARY KEY,
33 value TEXT NOT NULL,
44- updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
44+ updated_at TEXT NOT NULL DEFAULT (NOW()::text)
55);
···11use axum::http::{HeaderName, HeaderValue};
22+use axum::response::IntoResponse;
23use axum_extra::extract::cookie::{Cookie, Key, SignedCookieJar};
3445/// Build a Cookie header containing a signed session cookie for the given DID.
···910 cookie.set_path("/");
1011 let jar = jar.add(cookie);
11121212- // Extract the Set-Cookie value and convert to a Cookie request header
1313- let cookie_header = jar
1313+ // Build a response to extract the Set-Cookie header with the signed value,
1414+ // then convert it to a Cookie request header.
1515+ let response = jar.into_response();
1616+ let set_cookie_values: Vec<String> = response
1717+ .headers()
1818+ .get_all("set-cookie")
1419 .iter()
1515- .map(|c| format!("{}={}", c.name(), c.value()))
1616- .collect::<Vec<_>>()
1717- .join("; ");
2020+ .filter_map(|v| {
2121+ let s = v.to_str().ok()?;
2222+ // Extract just "name=value" from "name=value; Path=/; ..."
2323+ Some(s.split(';').next()?.to_string())
2424+ })
2525+ .collect();
2626+ let cookie_header = set_cookie_values.join("; ");
18271928 (
2029 HeaderName::from_static("cookie"),