mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-14 11:57:44 +00:00
Load /capabilities
endpoint on workers (#15436)
This commit is contained in:
parent
b5192355f6
commit
e4a25d022c
5 changed files with 5 additions and 1 deletions
1
changelog.d/15436.feature
Normal file
1
changelog.d/15436.feature
Normal file
|
@ -0,0 +1 @@
|
|||
Allow loading `/capabilities` endpoint on workers.
|
|
@ -174,6 +174,7 @@ WORKERS_CONFIG: Dict[str, Dict[str, Any]] = {
|
|||
"^/_matrix/client/(r0|v3|unstable)/user/.*/filter(/|$)",
|
||||
"^/_matrix/client/(r0|v3|unstable)/password_policy$",
|
||||
"^/_matrix/client/(api/v1|r0|v3|unstable)/directory/room/.*$",
|
||||
"^/_matrix/client/(r0|v3|unstable)/capabilities$",
|
||||
],
|
||||
"shared_extra_conf": {},
|
||||
"worker_extra_conf": "",
|
||||
|
|
|
@ -235,6 +235,7 @@ information.
|
|||
^/_matrix/client/(api/v1|r0|v3|unstable)/search$
|
||||
^/_matrix/client/(r0|v3|unstable)/user/.*/filter(/|$)
|
||||
^/_matrix/client/(api/v1|r0|v3|unstable)/directory/room/.*$
|
||||
^/_matrix/client/(r0|v3|unstable)/capabilities$
|
||||
|
||||
# Encryption requests
|
||||
^/_matrix/client/(r0|v3|unstable)/keys/query$
|
||||
|
|
|
@ -133,8 +133,8 @@ class ClientRestResource(JsonResource):
|
|||
if is_main_process:
|
||||
room_upgrade_rest_servlet.register_servlets(hs, client_resource)
|
||||
room_batch.register_servlets(hs, client_resource)
|
||||
capabilities.register_servlets(hs, client_resource)
|
||||
if is_main_process:
|
||||
capabilities.register_servlets(hs, client_resource)
|
||||
account_validity.register_servlets(hs, client_resource)
|
||||
relations.register_servlets(hs, client_resource)
|
||||
password_policy.register_servlets(hs, client_resource)
|
||||
|
|
|
@ -33,6 +33,7 @@ class CapabilitiesRestServlet(RestServlet):
|
|||
"""End point to expose the capabilities of the server."""
|
||||
|
||||
PATTERNS = client_patterns("/capabilities$")
|
||||
CATEGORY = "Client API requests"
|
||||
|
||||
def __init__(self, hs: "HomeServer"):
|
||||
super().__init__()
|
||||
|
|
Loading…
Reference in a new issue