feat: federation disabled by default
It can be enable in the Rocket.toml config or using ROCKET_FEDERATION_ENABLED=true
This commit is contained in:
parent
c15ae3c126
commit
6afc4c9b3e
5 changed files with 50 additions and 1 deletions
|
@ -14,6 +14,7 @@ pub struct Globals {
|
|||
max_request_size: u32,
|
||||
registration_disabled: bool,
|
||||
encryption_disabled: bool,
|
||||
federation_enabled: bool,
|
||||
}
|
||||
|
||||
impl Globals {
|
||||
|
@ -69,6 +70,7 @@ impl Globals {
|
|||
.map_err(|_| Error::BadConfig("Invalid max_request_size."))?,
|
||||
registration_disabled: config.get_bool("registration_disabled").unwrap_or(false),
|
||||
encryption_disabled: config.get_bool("encryption_disabled").unwrap_or(false),
|
||||
federation_enabled: config.get_bool("federation_enabled").unwrap_or(false),
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -114,4 +116,8 @@ impl Globals {
|
|||
pub fn encryption_disabled(&self) -> bool {
|
||||
self.encryption_disabled
|
||||
}
|
||||
|
||||
pub fn federation_enabled(&self) -> bool {
|
||||
self.federation_enabled
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue