From 31a0bdad439a4575c1686f690e9e72bd44dde472 Mon Sep 17 00:00:00 2001 From: Vika Date: Mon, 26 Aug 2024 15:22:29 +0300 Subject: Add HTTP fetcher cache It just does its thing in the background, potentially speeding up things. Maybe I could also use the underlying in-memory cache implementation (Moka) to speed up my database. I heard crates.io got some good results from that. --- src/login.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/login.rs') diff --git a/src/login.rs b/src/login.rs index bfa84b3..e105bcc 100644 --- a/src/login.rs +++ b/src/login.rs @@ -48,7 +48,7 @@ struct LoginForm { async fn post( Host(host): Host, mut cookies: SignedCookieJar, - State(http): State, + State(http): State, Form(form): Form, ) -> axum::response::Response { let code_verifier = kittybox_indieauth::PKCEVerifier::new(); @@ -204,7 +204,7 @@ async fn callback( Host(host): Host, Query(result): Query, cookie_jar: SignedCookieJar, - State(http): State, + State(http): State, State(session_store): State, ) -> axum::response::Response { let client_id: url::Url = format!("https://{}/.kittybox/login/client_metadata", host).parse().unwrap(); @@ -355,7 +355,7 @@ pub fn router() -> axum::routing::Router where St: Clone + Send + Sync + 'static, cookie::Key: FromRef, - reqwest::Client: FromRef, + reqwest_middleware::ClientWithMiddleware: FromRef, crate::SessionStore: FromRef, S: Storage + FromRef + Send + Sync + 'static, { -- cgit 1.4.1