refactor: check if federation is disabled inside the authcheck where possible
This commit is contained in:
parent
ab98b52b21
commit
5f0bea6961
2 changed files with 4 additions and 68 deletions
|
@ -149,6 +149,10 @@ where
|
|||
}
|
||||
}
|
||||
AuthScheme::ServerSignatures => {
|
||||
if !services().globals.allow_federation() {
|
||||
return Err(Error::bad_config("Federation is disabled."));
|
||||
}
|
||||
|
||||
let TypedHeader(Authorization(x_matrix)) = parts
|
||||
.extract::<TypedHeader<Authorization<XMatrix>>>()
|
||||
.await
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue