Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Disable loading RefreshTokenServlet on workers (#15428)
Browse files Browse the repository at this point in the history
  • Loading branch information
dklimpel committed Apr 13, 2023
1 parent 253e86a commit be36600
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/15428.bugfix
@@ -0,0 +1 @@
Disable loading `RefreshTokenServlet` (`/_matrix/client/(r0|v3|unstable)/refresh`) on workers.
5 changes: 4 additions & 1 deletion synapse/rest/client/login.py
Expand Up @@ -670,7 +670,10 @@ async def on_GET(self, request: SynapseRequest) -> None:

def register_servlets(hs: "HomeServer", http_server: HttpServer) -> None:
LoginRestServlet(hs).register(http_server)
if hs.config.registration.refreshable_access_token_lifetime is not None:
if (
hs.config.worker.worker_app is 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:
Expand Down

0 comments on commit be36600

Please sign in to comment.