refactor: disable federation at the router level

This commit is contained in:
Matthias Ahouansou 2024-04-12 20:52:14 +01:00
parent 7f63948db9
commit 475a68cbb9
No known key found for this signature in database
3 changed files with 44 additions and 44 deletions

View file

@ -149,10 +149,6 @@ where
Token::User((user_id, device_id)),
) => (Some(user_id), Some(device_id), None, false),
(AuthScheme::ServerSignatures, Token::None) => {
if !services().globals.allow_federation() {
return Err(Error::bad_config("Federation is disabled."));
}
let TypedHeader(Authorization(x_matrix)) = parts
.extract::<TypedHeader<Authorization<XMatrix>>>()
.await