Pass spawner to digest middleware

This commit is contained in:
asonix 2023-07-27 12:20:05 -05:00
parent a500824a7d
commit f86bbc95ae
3 changed files with 5 additions and 5 deletions

4
Cargo.lock generated
View file

@ -1460,9 +1460,9 @@ dependencies = [
[[package]] [[package]]
name = "http-signature-normalization-actix" name = "http-signature-normalization-actix"
version = "0.9.1" version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "218124b6b0c6ef27526493f50faf00b7cf8a3840bb1d5268f6ee8eef753b8225" checksum = "7978cadb8c73ab0d7115a4260e8a64188212ce44d11f0b0109c4beebc6bbb5c9"
dependencies = [ dependencies = [
"actix-http", "actix-http",
"actix-rt", "actix-rt",

View file

@ -89,7 +89,7 @@ default-features = false
features = ["background-jobs-actix", "error-logging"] features = ["background-jobs-actix", "error-logging"]
[dependencies.http-signature-normalization-actix] [dependencies.http-signature-normalization-actix]
version = "0.9.1" version = "0.10.0"
default-features = false default-features = false
features = ["client", "server", "sha-2"] features = ["client", "server", "sha-2"]

View file

@ -312,7 +312,7 @@ async fn do_server_main(
.service(web::resource("/media/{path}").route(web::get().to(routes::media))) .service(web::resource("/media/{path}").route(web::get().to(routes::media)))
.service( .service(
web::resource("/inbox") web::resource("/inbox")
.wrap(config.digest_middleware()) .wrap(config.digest_middleware().spawner(verify_spawner.clone()))
.wrap(VerifySignature::new( .wrap(VerifySignature::new(
MyVerify( MyVerify(
requests, requests,
@ -320,7 +320,7 @@ async fn do_server_main(
state.clone(), state.clone(),
verify_spawner.clone(), verify_spawner.clone(),
), ),
Default::default(), http_signature_normalization_actix::Config::new(),
)) ))
.wrap(DebugPayload(config.debug())) .wrap(DebugPayload(config.debug()))
.route(web::post().to(inbox)), .route(web::post().to(inbox)),