summary refs log tree commit diff
diff options
context:
space:
mode:
authorJason Little <realtyem@gmail.com>2023-03-17 08:50:31 -0500
committerGitHub <noreply@github.com>2023-03-17 09:50:31 -0400
commit3d70cc393fb32235bbeb94a0b97691dff5531f4d (patch)
tree9625abc5bb76e661f261a8f988bcae1a9e7ab23a
parentMake `configure_workers_and_start` script used in Complement tests compatible... (diff)
downloadsynapse-3d70cc393fb32235bbeb94a0b97691dff5531f4d.tar.xz
Load `/register/available` endpoint on workers (#15268)
-rw-r--r--changelog.d/15268.feature1
-rwxr-xr-xdocker/configure_workers_and_start.py1
-rw-r--r--docs/workers.md1
-rw-r--r--synapse/rest/client/register.py2
4 files changed, 4 insertions, 1 deletions
diff --git a/changelog.d/15268.feature b/changelog.d/15268.feature
new file mode 100644
index 0000000000..5f1f1a0f58
--- /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 376f9ed635..3f2f5c2daf 100755
--- a/docker/configure_workers_and_start.py
+++ b/docker/configure_workers_and_start.py
@@ -163,6 +163,7 @@ WORKERS_CONFIG: Dict[str, Dict[str, Any]] = {
             "^/_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 e0e99b4453..bf7690f5af 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 bce806f2bb..4adb5271d2 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)