From f86bbc95ae4e49ed1d4e83652d8276b5350c3de0 Mon Sep 17 00:00:00 2001 From: asonix Date: Thu, 27 Jul 2023 12:20:05 -0500 Subject: [PATCH] Pass spawner to digest middleware --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- src/main.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cab5210..c609dbd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1460,9 +1460,9 @@ dependencies = [ [[package]] name = "http-signature-normalization-actix" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "218124b6b0c6ef27526493f50faf00b7cf8a3840bb1d5268f6ee8eef753b8225" +checksum = "7978cadb8c73ab0d7115a4260e8a64188212ce44d11f0b0109c4beebc6bbb5c9" dependencies = [ "actix-http", "actix-rt", diff --git a/Cargo.toml b/Cargo.toml index 83309f3..4c6ad95 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -89,7 +89,7 @@ default-features = false features = ["background-jobs-actix", "error-logging"] [dependencies.http-signature-normalization-actix] -version = "0.9.1" +version = "0.10.0" default-features = false features = ["client", "server", "sha-2"] diff --git a/src/main.rs b/src/main.rs index 5800564..18b7c48 100644 --- a/src/main.rs +++ b/src/main.rs @@ -312,7 +312,7 @@ async fn do_server_main( .service(web::resource("/media/{path}").route(web::get().to(routes::media))) .service( web::resource("/inbox") - .wrap(config.digest_middleware()) + .wrap(config.digest_middleware().spawner(verify_spawner.clone())) .wrap(VerifySignature::new( MyVerify( requests, @@ -320,7 +320,7 @@ async fn do_server_main( state.clone(), verify_spawner.clone(), ), - Default::default(), + http_signature_normalization_actix::Config::new(), )) .wrap(DebugPayload(config.debug())) .route(web::post().to(inbox)),