Load `/password_policy` endpoint on workers. (#15331)
This commit is contained in:
parent
7a892ce793
commit
4fc85e5a92
|
@ -0,0 +1 @@
|
||||||
|
Allow loading `/password_policy` endpoint on workers.
|
|
@ -172,6 +172,7 @@ WORKERS_CONFIG: Dict[str, Dict[str, Any]] = {
|
||||||
"^/_matrix/client/v1/rooms/.*/timestamp_to_event$",
|
"^/_matrix/client/v1/rooms/.*/timestamp_to_event$",
|
||||||
"^/_matrix/client/(api/v1|r0|v3|unstable)/search",
|
"^/_matrix/client/(api/v1|r0|v3|unstable)/search",
|
||||||
"^/_matrix/client/(r0|v3|unstable)/user/.*/filter(/|$)",
|
"^/_matrix/client/(r0|v3|unstable)/user/.*/filter(/|$)",
|
||||||
|
"^/_matrix/client/(r0|v3|unstable)/password_policy$",
|
||||||
],
|
],
|
||||||
"shared_extra_conf": {},
|
"shared_extra_conf": {},
|
||||||
"worker_extra_conf": "",
|
"worker_extra_conf": "",
|
||||||
|
|
|
@ -247,6 +247,7 @@ information.
|
||||||
^/_matrix/client/(r0|v3|unstable)/register$
|
^/_matrix/client/(r0|v3|unstable)/register$
|
||||||
^/_matrix/client/(r0|v3|unstable)/register/available$
|
^/_matrix/client/(r0|v3|unstable)/register/available$
|
||||||
^/_matrix/client/v1/register/m.login.registration_token/validity$
|
^/_matrix/client/v1/register/m.login.registration_token/validity$
|
||||||
|
^/_matrix/client/(r0|v3|unstable)/password_policy$
|
||||||
|
|
||||||
# Event sending requests
|
# Event sending requests
|
||||||
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact
|
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact
|
||||||
|
|
|
@ -138,7 +138,6 @@ class ClientRestResource(JsonResource):
|
||||||
capabilities.register_servlets(hs, client_resource)
|
capabilities.register_servlets(hs, client_resource)
|
||||||
account_validity.register_servlets(hs, client_resource)
|
account_validity.register_servlets(hs, client_resource)
|
||||||
relations.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)
|
knock.register_servlets(hs, client_resource)
|
||||||
appservice_ping.register_servlets(hs, client_resource)
|
appservice_ping.register_servlets(hs, client_resource)
|
||||||
|
|
|
@ -31,6 +31,7 @@ logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
class PasswordPolicyServlet(RestServlet):
|
class PasswordPolicyServlet(RestServlet):
|
||||||
PATTERNS = client_patterns("/password_policy$")
|
PATTERNS = client_patterns("/password_policy$")
|
||||||
|
CATEGORY = "Registration/login requests"
|
||||||
|
|
||||||
def __init__(self, hs: "HomeServer"):
|
def __init__(self, hs: "HomeServer"):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
Loading…
Reference in New Issue