From ac567cd67dce79f5a0aec4e0d41cb68d6d61aea2 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Wed, 20 Nov 2024 07:23:35 +0530 Subject: [PATCH] feat: HTTPSig authenticated fetch --- src/federation/adapter/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/federation/adapter/mod.rs b/src/federation/adapter/mod.rs index f35c314..c2f531b 100644 --- a/src/federation/adapter/mod.rs +++ b/src/federation/adapter/mod.rs @@ -199,6 +199,11 @@ impl Adapters { pub async fn federation_config(pool: PgPool, settings: &settings::Settings) -> WebFederationConfig { let adapters = Adapters::new(pool, settings); + let system_actor = adapters + .get_system_actor_service + .get_system_actor() + .await + .unwrap(); let mut data = Dependencies::default(); data.insert(adapters.out_db_get_person_adapter.clone()); @@ -231,6 +236,7 @@ pub async fn federation_config(pool: PgPool, settings: &settings::Settings) -> W actix_web::web::Data::new( activitypub_federation::config::FederationConfig::builder() .domain(settings.server.domain.clone()) + .signed_fetch_actor(&system_actor) .client( crate::utils::ap_client::APClientBuilder::default() .user_agent(settings.server.domain.clone())