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
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 {
}
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! {
pub front_end_dir: String,
pub rate_limit: RateLimitConfig,
pub email: Option<EmailConfig>,
- pub federation_enabled: bool,
}
#[derive(Debug, Deserialize, Clone)]