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

Commit 1f196f5

Browse files
committed
Update workers.md to use v3 client and media APIs
Signed-off-by: Aaron Raimist <[email protected]>
1 parent 0fc43e4 commit 1f196f5

File tree

2 files changed

+46
-46
lines changed

2 files changed

+46
-46
lines changed

docker/configure_workers_and_start.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"app": "synapse.app.user_dir",
4949
"listener_resources": ["client"],
5050
"endpoint_patterns": [
51-
"^/_matrix/client/(api/v1|r0|unstable)/user_directory/search$"
51+
"^/_matrix/client/(api/v1|r0|v3|unstable)/user_directory/search$"
5252
],
5353
"shared_extra_conf": {"update_user_directory": False},
5454
"worker_extra_conf": "",
@@ -85,10 +85,10 @@
8585
"app": "synapse.app.generic_worker",
8686
"listener_resources": ["client"],
8787
"endpoint_patterns": [
88-
"^/_matrix/client/(v2_alpha|r0)/sync$",
89-
"^/_matrix/client/(api/v1|v2_alpha|r0)/events$",
90-
"^/_matrix/client/(api/v1|r0)/initialSync$",
91-
"^/_matrix/client/(api/v1|r0)/rooms/[^/]+/initialSync$",
88+
"^/_matrix/client/(v2_alpha|r0|v3)/sync$",
89+
"^/_matrix/client/(api/v1|v2_alpha|r0|v3)/events$",
90+
"^/_matrix/client/(api/v1|r0|v3)/initialSync$",
91+
"^/_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync$",
9292
],
9393
"shared_extra_conf": {},
9494
"worker_extra_conf": "",
@@ -146,19 +146,19 @@
146146
"app": "synapse.app.generic_worker",
147147
"listener_resources": ["client"],
148148
"endpoint_patterns": [
149-
"^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/redact",
150-
"^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/send",
151-
"^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/(join|invite|leave|ban|unban|kick)$",
152-
"^/_matrix/client/(api/v1|r0|unstable)/join/",
153-
"^/_matrix/client/(api/v1|r0|unstable)/profile/",
149+
"^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact",
150+
"^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/send",
151+
"^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/(join|invite|leave|ban|unban|kick)$",
152+
"^/_matrix/client/(api/v1|r0|v3|unstable)/join/",
153+
"^/_matrix/client/(api/v1|r0|v3|unstable)/profile/",
154154
],
155155
"shared_extra_conf": {},
156156
"worker_extra_conf": "",
157157
},
158158
"frontend_proxy": {
159159
"app": "synapse.app.frontend_proxy",
160160
"listener_resources": ["client", "replication"],
161-
"endpoint_patterns": ["^/_matrix/client/(api/v1|r0|unstable)/keys/upload"],
161+
"endpoint_patterns": ["^/_matrix/client/(api/v1|r0|v3|unstable)/keys/upload"],
162162
"shared_extra_conf": {},
163163
"worker_extra_conf": (
164164
"worker_main_http_uri: http://127.0.0.1:%d"

docs/workers.md

+35-35
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ This worker can handle API requests matching the following regular
182182
expressions:
183183

184184
# Sync requests
185-
^/_matrix/client/(v2_alpha|r0)/sync$
186-
^/_matrix/client/(api/v1|v2_alpha|r0)/events$
187-
^/_matrix/client/(api/v1|r0)/initialSync$
188-
^/_matrix/client/(api/v1|r0)/rooms/[^/]+/initialSync$
185+
^/_matrix/client/(v2_alpha|r0|v3)/sync$
186+
^/_matrix/client/(api/v1|v2_alpha|r0|v3)/events$
187+
^/_matrix/client/(api/v1|r0|v3)/initialSync$
188+
^/_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync$
189189

190190
# Federation requests
191191
^/_matrix/federation/v1/event/
@@ -216,40 +216,40 @@ expressions:
216216
^/_matrix/federation/v1/send/
217217

218218
# Client API requests
219-
^/_matrix/client/(api/v1|r0|unstable)/createRoom$
220-
^/_matrix/client/(api/v1|r0|unstable)/publicRooms$
221-
^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/joined_members$
222-
^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/context/.*$
223-
^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/members$
224-
^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/state$
219+
^/_matrix/client/(api/v1|r0|v3|unstable)/createRoom$
220+
^/_matrix/client/(api/v1|r0|v3|unstable)/publicRooms$
221+
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/joined_members$
222+
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/context/.*$
223+
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members$
224+
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state$
225225
^/_matrix/client/unstable/org.matrix.msc2946/rooms/.*/spaces$
226226
^/_matrix/client/unstable/org.matrix.msc2946/rooms/.*/hierarchy$
227227
^/_matrix/client/unstable/im.nheko.summary/rooms/.*/summary$
228-
^/_matrix/client/(api/v1|r0|unstable)/account/3pid$
229-
^/_matrix/client/(api/v1|r0|unstable)/devices$
230-
^/_matrix/client/(api/v1|r0|unstable)/keys/query$
231-
^/_matrix/client/(api/v1|r0|unstable)/keys/changes$
228+
^/_matrix/client/(api/v1|r0|v3|unstable)/account/3pid$
229+
^/_matrix/client/(api/v1|r0|v3|unstable)/devices$
230+
^/_matrix/client/(api/v1|r0|v3|unstable)/keys/query$
231+
^/_matrix/client/(api/v1|r0|v3|unstable)/keys/changes$
232232
^/_matrix/client/versions$
233-
^/_matrix/client/(api/v1|r0|unstable)/voip/turnServer$
234-
^/_matrix/client/(api/v1|r0|unstable)/joined_groups$
235-
^/_matrix/client/(api/v1|r0|unstable)/publicised_groups$
236-
^/_matrix/client/(api/v1|r0|unstable)/publicised_groups/
237-
^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/event/
238-
^/_matrix/client/(api/v1|r0|unstable)/joined_rooms$
239-
^/_matrix/client/(api/v1|r0|unstable)/search$
233+
^/_matrix/client/(api/v1|r0|v3|unstable)/voip/turnServer$
234+
^/_matrix/client/(api/v1|r0|v3|unstable)/joined_groups$
235+
^/_matrix/client/(api/v1|r0|v3|unstable)/publicised_groups$
236+
^/_matrix/client/(api/v1|r0|v3|unstable)/publicised_groups/
237+
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/event/
238+
^/_matrix/client/(api/v1|r0|v3|unstable)/joined_rooms$
239+
^/_matrix/client/(api/v1|r0|v3|unstable)/search$
240240

241241
# Registration/login requests
242-
^/_matrix/client/(api/v1|r0|unstable)/login$
243-
^/_matrix/client/(r0|unstable)/register$
242+
^/_matrix/client/(api/v1|r0|v3|unstable)/login$
243+
^/_matrix/client/(r0|v3|unstable)/register$
244244
^/_matrix/client/unstable/org.matrix.msc3231/register/org.matrix.msc3231.login.registration_token/validity$
245245

246246
# Event sending requests
247-
^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/redact
248-
^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/send
249-
^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/state/
250-
^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/(join|invite|leave|ban|unban|kick)$
251-
^/_matrix/client/(api/v1|r0|unstable)/join/
252-
^/_matrix/client/(api/v1|r0|unstable)/profile/
247+
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact
248+
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/send
249+
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state/
250+
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/(join|invite|leave|ban|unban|kick)$
251+
^/_matrix/client/(api/v1|r0|v3|unstable)/join/
252+
^/_matrix/client/(api/v1|r0|v3|unstable)/profile/
253253

254254

255255
Additionally, the following REST endpoints can be handled for GET requests:
@@ -261,14 +261,14 @@ room must be routed to the same instance. Additionally, care must be taken to
261261
ensure that the purge history admin API is not used while pagination requests
262262
for the room are in flight:
263263

264-
^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/messages$
264+
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/messages$
265265

266266
Additionally, the following endpoints should be included if Synapse is configured
267267
to use SSO (you only need to include the ones for whichever SSO provider you're
268268
using):
269269

270270
# for all SSO providers
271-
^/_matrix/client/(api/v1|r0|unstable)/login/sso/redirect
271+
^/_matrix/client/(api/v1|r0|v3|unstable)/login/sso/redirect
272272
^/_synapse/client/pick_idp$
273273
^/_synapse/client/pick_username
274274
^/_synapse/client/new_user_consent$
@@ -281,7 +281,7 @@ using):
281281
^/_synapse/client/saml2/authn_response$
282282

283283
# CAS requests.
284-
^/_matrix/client/(api/v1|r0|unstable)/login/cas/ticket$
284+
^/_matrix/client/(api/v1|r0|v3|unstable)/login/cas/ticket$
285285

286286
Ensure that all SSO logins go to a single process.
287287
For multiple workers not handling the SSO endpoints properly, see
@@ -465,7 +465,7 @@ Note that if a reverse proxy is used , then `/_matrix/media/` must be routed for
465465
Handles searches in the user directory. It can handle REST endpoints matching
466466
the following regular expressions:
467467

468-
^/_matrix/client/(api/v1|r0|unstable)/user_directory/search$
468+
^/_matrix/client/(api/v1|r0|v3|unstable)/user_directory/search$
469469

470470
When using this worker you must also set `update_user_directory: False` in the
471471
shared configuration file to stop the main synapse running background
@@ -477,12 +477,12 @@ Proxies some frequently-requested client endpoints to add caching and remove
477477
load from the main synapse. It can handle REST endpoints matching the following
478478
regular expressions:
479479

480-
^/_matrix/client/(api/v1|r0|unstable)/keys/upload
480+
^/_matrix/client/(api/v1|r0|v3|unstable)/keys/upload
481481

482482
If `use_presence` is False in the homeserver config, it can also handle REST
483483
endpoints matching the following regular expressions:
484484

485-
^/_matrix/client/(api/v1|r0|unstable)/presence/[^/]+/status
485+
^/_matrix/client/(api/v1|r0|v3|unstable)/presence/[^/]+/status
486486

487487
This "stub" presence handler will pass through `GET` request but make the
488488
`PUT` effectively a no-op.

0 commit comments

Comments
 (0)