add federation allow list

This commit is contained in:
Jade Ellis 2025-01-18 15:21:55 +00:00
parent eb7d893c86
commit 371103fb35
No known key found for this signature in database
GPG key ID: 8705A2A3EBF77BD2
15 changed files with 101 additions and 94 deletions

View file

@ -65,13 +65,7 @@ where
return Err!(Config("allow_federation", "Federation is disabled."));
}
if self
.services
.server
.config
.forbidden_remote_server_names
.contains(dest)
{
if self.services.moderation.is_remote_server_forbidden(dest) {
return Err!(Request(Forbidden(debug_warn!("Federation with {dest} is not allowed."))));
}