From: Dessalines Date: Mon, 25 May 2020 22:48:24 +0000 (-0400) Subject: Remove federation option from master. (#745) X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/readmes/%7B%7D/%22%7Burl%7D/%24%7Bargs.pageFn.prev%7D?a=commitdiff_plain;h=80653a531774291ccd44e7ba6b78fff5502d57f0;p=lemmy.git Remove federation option from master. (#745) --- diff --git a/docker/lemmy.hjson b/docker/lemmy.hjson index 8fe9bf55..271fc78d 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 9ade8028..af6fc282 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 eaab1cb8..18a21efa 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 6e5667cb..9d58d5b5 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)]