From 80653a531774291ccd44e7ba6b78fff5502d57f0 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 25 May 2020 18:48:24 -0400 Subject: [PATCH] Remove federation option from master. (#745) --- docker/lemmy.hjson | 3 --- server/src/routes/nodeinfo.rs | 6 +----- server/src/routes/webfinger.rs | 10 ++++------ server/src/settings.rs | 1 - 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/docker/lemmy.hjson b/docker/lemmy.hjson index 8fe9bf554cb..271fc78d8ae 100644 --- a/docker/lemmy.hjson +++ b/docker/lemmy.hjson @@ -23,9 +23,6 @@ jwt_secret: "changeme" # The dir for the front end front_end_dir: "/app/dist" - # whether to enable activitypub federation. this feature is in alpha, do not enable in production, as might - # cause problems like remote instances fetching and permanently storing bad data. - federation_enabled: false # rate limits for various user actions, by user ip rate_limit: { # maximum number of messages created in interval diff --git a/server/src/routes/nodeinfo.rs b/server/src/routes/nodeinfo.rs index 9ade80283a6..af6fc282270 100644 --- a/server/src/routes/nodeinfo.rs +++ b/server/src/routes/nodeinfo.rs @@ -25,11 +25,7 @@ async fn node_info( Ok(site_view) => site_view, Err(_) => return Err(format_err!("not_found")), }; - let protocols = if Settings::get().federation_enabled { - vec!["activitypub".to_string()] - } else { - vec![] - }; + let protocols = vec![]; Ok(NodeInfo { version: "2.0".to_string(), software: NodeInfoSoftware { diff --git a/server/src/routes/webfinger.rs b/server/src/routes/webfinger.rs index eaab1cb8cff..18a21efa120 100644 --- a/server/src/routes/webfinger.rs +++ b/server/src/routes/webfinger.rs @@ -7,12 +7,10 @@ pub struct Params { } pub fn config(cfg: &mut web::ServiceConfig) { - if Settings::get().federation_enabled { - cfg.route( - ".well-known/webfinger", - web::get().to(get_webfinger_response), - ); - } + cfg.route( + ".well-known/webfinger", + web::get().to(get_webfinger_response), + ); } lazy_static! { diff --git a/server/src/settings.rs b/server/src/settings.rs index 6e5667cb2ee..9d58d5b5d8e 100644 --- a/server/src/settings.rs +++ b/server/src/settings.rs @@ -20,7 +20,6 @@ pub struct Settings { pub front_end_dir: String, pub rate_limit: RateLimitConfig, pub email: Option, - pub federation_enabled: bool, } #[derive(Debug, Deserialize, Clone)]