diff --git a/changelog.d/15268.feature b/changelog.d/15268.feature new file mode 100644 index 000000000000..5f1f1a0f589c --- /dev/null +++ b/changelog.d/15268.feature @@ -0,0 +1 @@ +Allow loading `/register/available` endpoint on workers. diff --git a/docker/configure_workers_and_start.py b/docker/configure_workers_and_start.py index cfb16c2e2240..291f963fd219 100755 --- a/docker/configure_workers_and_start.py +++ b/docker/configure_workers_and_start.py @@ -163,6 +163,7 @@ "^/_matrix/client/versions$", "^/_matrix/client/(api/v1|r0|v3|unstable)/voip/turnServer$", "^/_matrix/client/(r0|v3|unstable)/register$", + "^/_matrix/client/(r0|v3|unstable)/register/available$", "^/_matrix/client/(r0|v3|unstable)/auth/.*/fallback/web$", "^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/messages$", "^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/event", diff --git a/docs/workers.md b/docs/workers.md index e0e99b44539e..bf7690f5aff2 100644 --- a/docs/workers.md +++ b/docs/workers.md @@ -245,6 +245,7 @@ information. # Registration/login requests ^/_matrix/client/(api/v1|r0|v3|unstable)/login$ ^/_matrix/client/(r0|v3|unstable)/register$ + ^/_matrix/client/(r0|v3|unstable)/register/available$ ^/_matrix/client/v1/register/m.login.registration_token/validity$ # Event sending requests diff --git a/synapse/rest/client/register.py b/synapse/rest/client/register.py index bce806f2bbb4..4adb5271d22f 100644 --- a/synapse/rest/client/register.py +++ b/synapse/rest/client/register.py @@ -956,7 +956,7 @@ def register_servlets(hs: "HomeServer", http_server: HttpServer) -> None: if hs.config.worker.worker_app is None: EmailRegisterRequestTokenRestServlet(hs).register(http_server) MsisdnRegisterRequestTokenRestServlet(hs).register(http_server) - UsernameAvailabilityRestServlet(hs).register(http_server) RegistrationSubmitTokenServlet(hs).register(http_server) + UsernameAvailabilityRestServlet(hs).register(http_server) RegistrationTokenValidityRestServlet(hs).register(http_server) RegisterRestServlet(hs).register(http_server)