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

Disable loading RefreshTokenServlet on workers #15428

Merged
merged 2 commits into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/15428.bugfix
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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