]> Untitled Git - lemmy.git/blobdiff - crates/apub/src/http/routes.rs
Implement instance actor (#1798)
[lemmy.git] / crates / apub / src / http / routes.rs
index a57290e4b9023bbfcf7aa51bd3daa492fa64ad9b..d90bf40029cdc7e18b5feff5101940d00a81c1ce 100644 (file)
@@ -11,6 +11,7 @@ use crate::http::{
   person::{get_apub_person_http, get_apub_person_outbox, person_inbox},
   post::get_apub_post,
   shared_inbox,
+  site::{get_apub_site_http, get_apub_site_inbox, get_apub_site_outbox},
 };
 use actix_web::{
   guard::{Guard, GuardContext},
@@ -26,6 +27,8 @@ pub fn config(cfg: &mut web::ServiceConfig, settings: &Settings) {
     println!("federation enabled, host is {}", settings.hostname);
 
     cfg
+      .route("/", web::get().to(get_apub_site_http))
+      .route("/site_outbox", web::get().to(get_apub_site_outbox))
       .route(
         "/c/{community_name}",
         web::get().to(get_apub_community_http),
@@ -57,7 +60,8 @@ pub fn config(cfg: &mut web::ServiceConfig, settings: &Settings) {
         .guard(InboxRequestGuard)
         .route("/c/{community_name}/inbox", web::post().to(community_inbox))
         .route("/u/{user_name}/inbox", web::post().to(person_inbox))
-        .route("/inbox", web::post().to(shared_inbox)),
+        .route("/inbox", web::post().to(shared_inbox))
+        .route("/site_inbox", web::post().to(get_apub_site_inbox)),
     );
   }
 }