]> Untitled Git - lemmy.git/blobdiff - crates/apub/src/http/routes.rs
Moving settings and secrets to context.
[lemmy.git] / crates / apub / src / http / routes.rs
index cd6b11486ee5afa08a9864a0fdb2425f95b9d819..612cc45864207759d0a27e183529e89b685b1e4a 100644 (file)
@@ -24,9 +24,9 @@ use sha2::{Digest, Sha256};
 static APUB_JSON_CONTENT_TYPE_LONG: &str =
   "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"";
 
-pub fn config(cfg: &mut web::ServiceConfig) {
-  if Settings::get().federation.enabled {
-    println!("federation enabled, host is {}", Settings::get().hostname);
+pub fn config(cfg: &mut web::ServiceConfig, settings: &Settings) {
+  if settings.federation.enabled {
+    println!("federation enabled, host is {}", settings.hostname);
     let digest_verifier = VerifyDigest::new(Sha256::new());
 
     let header_guard_accept = guard::Any(guard::Header("Accept", APUB_JSON_CONTENT_TYPE))