Skip to content

Commit

Permalink
dont load federation download servlet if the media repo is not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Shay committed May 9, 2024
1 parent 522e752 commit a015532
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions synapse/federation/transport/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
FEDERATION_SERVLET_CLASSES,
FederationAccountStatusServlet,
FederationUnstableClientKeysClaimServlet,
FederationUnstableMediaDownloadServlet,
)
from synapse.http.server import HttpServer, JsonResource
from synapse.http.servlet import (
Expand Down Expand Up @@ -315,6 +316,12 @@ def register_servlets(
):
continue

if (
servletclass == FederationUnstableMediaDownloadServlet
and not hs.config.server.enable_media_repo
):
continue

servletclass(
hs=hs,
authenticator=authenticator,
Expand Down

0 comments on commit a015532

Please sign in to comment.