mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-24 17:00:36 +00:00
Remove federation option from master. (#745)
This commit is contained in:
parent
e54eac6227
commit
80653a5317
4 changed files with 5 additions and 15 deletions
3
docker/lemmy.hjson
vendored
3
docker/lemmy.hjson
vendored
|
@ -23,9 +23,6 @@
|
||||||
jwt_secret: "changeme"
|
jwt_secret: "changeme"
|
||||||
# The dir for the front end
|
# The dir for the front end
|
||||||
front_end_dir: "/app/dist"
|
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 limits for various user actions, by user ip
|
||||||
rate_limit: {
|
rate_limit: {
|
||||||
# maximum number of messages created in interval
|
# maximum number of messages created in interval
|
||||||
|
|
|
@ -25,11 +25,7 @@ async fn node_info(
|
||||||
Ok(site_view) => site_view,
|
Ok(site_view) => site_view,
|
||||||
Err(_) => return Err(format_err!("not_found")),
|
Err(_) => return Err(format_err!("not_found")),
|
||||||
};
|
};
|
||||||
let protocols = if Settings::get().federation_enabled {
|
let protocols = vec![];
|
||||||
vec!["activitypub".to_string()]
|
|
||||||
} else {
|
|
||||||
vec![]
|
|
||||||
};
|
|
||||||
Ok(NodeInfo {
|
Ok(NodeInfo {
|
||||||
version: "2.0".to_string(),
|
version: "2.0".to_string(),
|
||||||
software: NodeInfoSoftware {
|
software: NodeInfoSoftware {
|
||||||
|
|
|
@ -7,12 +7,10 @@ pub struct Params {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn config(cfg: &mut web::ServiceConfig) {
|
pub fn config(cfg: &mut web::ServiceConfig) {
|
||||||
if Settings::get().federation_enabled {
|
cfg.route(
|
||||||
cfg.route(
|
".well-known/webfinger",
|
||||||
".well-known/webfinger",
|
web::get().to(get_webfinger_response),
|
||||||
web::get().to(get_webfinger_response),
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
|
|
|
@ -20,7 +20,6 @@ pub struct Settings {
|
||||||
pub front_end_dir: String,
|
pub front_end_dir: String,
|
||||||
pub rate_limit: RateLimitConfig,
|
pub rate_limit: RateLimitConfig,
|
||||||
pub email: Option<EmailConfig>,
|
pub email: Option<EmailConfig>,
|
||||||
pub federation_enabled: bool,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Clone)]
|
#[derive(Debug, Deserialize, Clone)]
|
||||||
|
|
Loading…
Reference in a new issue