summary refs log tree commit diff
path: root/synapse/rest/client
diff options
context:
space:
mode:
authorDirk Klimpel <5740567+dklimpel@users.noreply.github.com>2023-04-13 15:08:00 +0200
committerGitHub <noreply@github.com>2023-04-13 13:08:00 +0000
commitc9723a1c1fbae1cc172fc9257fd1f1f259d2a23f (patch)
tree089263a551a0f8347a6c7ae03aa4677ec21117a5 /synapse/rest/client
parentDisable loading `RefreshTokenServlet` on workers (#15428) (diff)
downloadsynapse-c9723a1c1fbae1cc172fc9257fd1f1f259d2a23f.tar.xz
Only load the SSO redirect servlet if SSO is enabled. (#15421)
Diffstat (limited to 'synapse/rest/client')
-rw-r--r--synapse/rest/client/login.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/rest/client/login.py b/synapse/rest/client/login.py
index 32c2f5ce0c..a348720131 100644
--- a/synapse/rest/client/login.py
+++ b/synapse/rest/client/login.py
@@ -675,7 +675,12 @@ def register_servlets(hs: "HomeServer", http_server: HttpServer) -> None:
         and hs.config.registration.refreshable_access_token_lifetime is not None
     ):
         RefreshTokenServlet(hs).register(http_server)
-    SsoRedirectServlet(hs).register(http_server)
+    if (
+        hs.config.cas.cas_enabled
+        or hs.config.saml2.saml2_enabled
+        or hs.config.oidc.oidc_enabled
+    ):
+        SsoRedirectServlet(hs).register(http_server)
     if hs.config.cas.cas_enabled:
         CasTicketServlet(hs).register(http_server)