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

Commit

Permalink
Load /password_policy endpoint on workers. (#15331)
Browse files Browse the repository at this point in the history
  • Loading branch information
dklimpel committed Mar 27, 2023
1 parent 7a892ce commit 4fc85e5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/15331.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow loading `/password_policy` endpoint on workers.
1 change: 1 addition & 0 deletions docker/configure_workers_and_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@
"^/_matrix/client/v1/rooms/.*/timestamp_to_event$",
"^/_matrix/client/(api/v1|r0|v3|unstable)/search",
"^/_matrix/client/(r0|v3|unstable)/user/.*/filter(/|$)",
"^/_matrix/client/(r0|v3|unstable)/password_policy$",
],
"shared_extra_conf": {},
"worker_extra_conf": "",
Expand Down
1 change: 1 addition & 0 deletions docs/workers.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ information.
^/_matrix/client/(r0|v3|unstable)/register$
^/_matrix/client/(r0|v3|unstable)/register/available$
^/_matrix/client/v1/register/m.login.registration_token/validity$
^/_matrix/client/(r0|v3|unstable)/password_policy$

# Event sending requests
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact
Expand Down
3 changes: 1 addition & 2 deletions synapse/rest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ def register_servlets(client_resource: HttpServer, hs: "HomeServer") -> None:
capabilities.register_servlets(hs, client_resource)
account_validity.register_servlets(hs, client_resource)
relations.register_servlets(hs, client_resource)
if is_main_process:
password_policy.register_servlets(hs, client_resource)
password_policy.register_servlets(hs, client_resource)
knock.register_servlets(hs, client_resource)
appservice_ping.register_servlets(hs, client_resource)

Expand Down
1 change: 1 addition & 0 deletions synapse/rest/client/password_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

class PasswordPolicyServlet(RestServlet):
PATTERNS = client_patterns("/password_policy$")
CATEGORY = "Registration/login requests"

def __init__(self, hs: "HomeServer"):
super().__init__()
Expand Down

0 comments on commit 4fc85e5

Please sign in to comment.