382 lines
10 KiB
Plaintext
Raw Normal View History

2021-08-01 14:34:00 +02:00
# Generic Worker
#
# note:
# http://localhost:8083 -> matrix-synchrotron-balancer
# generic_worker_lc -> upstream_proxy (least_conn)
# generic_worker_ih -> upstream_proxy (ip_hash)
#
2021-08-01 14:34:00 +02:00
## Sync requests
location ~ ^/_matrix/client/(r0|v3)/sync$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://localhost:8083;
2021-08-01 14:34:00 +02:00
}
location ~ ^/_matrix/client/(api/v1|r0|v3)/events$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-11-29 15:25:10 +01:00
proxy_pass http://localhost:8083;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/client/(api/v1|r0|v3)/initialSync$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://localhost:8083;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://localhost:8083;
2021-08-01 14:34:00 +02:00
}
## Federation requests
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/federation/v1/event/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/federation/v1/state/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/federation/v1/state_ids/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/federation/v1/backfill/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/federation/v1/get_missing_events/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/federation/v1/publicRooms {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/federation/v1/query/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/federation/v1/make_join/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/federation/v1/make_leave/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
location ~ ^/_matrix/federation/(v1|v2)/send_join/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
location ~ ^/_matrix/federation/(v1|v2)/send_leave/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
location ~ ^/_matrix/federation/(v1|v2)/invite/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/federation/v1/event_auth/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-11-29 15:25:10 +01:00
location ~ ^/_matrix/federation/v1/timestamp_to_event/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
2023-03-28 15:14:56 +02:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable/.*)/rooms/.*/aliases {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/federation/v1/exchange_third_party_invite/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/federation/v1/user/devices/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/key/v2/query {
2022-01-05 15:43:39 +01:00
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
2022-06-14 21:06:03 +02:00
location ~ ^/_matrix/federation/v1/hierarchy/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
## Inbound federation transaction request
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/federation/v1/send/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_ih;
2021-08-01 14:34:00 +02:00
}
## Client API requests
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/createRoom$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/publicRooms$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/joined_members$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/context/.*$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state$ {
2022-01-05 15:43:39 +01:00
include include.d/synapse-proxy.conf;
2021-08-01 14:34:00 +02:00
proxy_pass http://generic_worker_lc;
2022-01-05 15:43:39 +01:00
}
2022-06-14 21:06:03 +02:00
location ~ ^/_matrix/client/v1/rooms/.*/hierarchy$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-10-25 17:55:01 +02:00
location ~ ^/_matrix/client/(v1|unstable)/rooms/.*/relations/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~ ^/_matrix/client/v1/rooms/.*/threads$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
2022-06-14 21:06:03 +02:00
location ~ ^/_matrix/client/unstable/org.matrix.msc2716/rooms/.*/batch_send$ {
2022-01-05 15:43:39 +01:00
include include.d/synapse-proxy.conf;
2021-08-01 14:34:00 +02:00
proxy_pass http://generic_worker_lc;
2022-01-05 15:43:39 +01:00
}
2022-06-14 21:06:03 +02:00
location ~ ^/_matrix/client/unstable/im.nheko.summary/rooms/.*/summary$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-06-14 21:06:03 +02:00
location ~ ^/_matrix/client/(r0|v3|unstable)/account/3pid$ {
2022-01-05 15:43:39 +01:00
include include.d/synapse-proxy.conf;
2021-08-01 14:34:00 +02:00
proxy_pass http://generic_worker_lc;
2022-01-05 15:43:39 +01:00
}
2022-06-14 21:06:03 +02:00
location ~ ^/_matrix/client/(r0|v3|unstable)/account/whoami$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-06-14 21:06:03 +02:00
location ~ ^/_matrix/client/(r0|v3|unstable)/devices$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-06-14 21:06:03 +02:00
location ~ ^/_matrix/client/versions$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-06-14 21:06:03 +02:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/voip/turnServer$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-03-08 16:24:25 +01:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/event/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-03-08 16:24:25 +01:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/joined_rooms$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-11-29 15:25:10 +01:00
location ~ ^/_matrix/client/v1/rooms/.*/timestamp_to_event$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
2022-03-08 16:24:25 +01:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/search$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2023-03-28 15:14:56 +02:00
location ~ ^/_matrix/client/(r0|v3|unstable)/user/.*/filter(/|$) {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
2023-04-28 16:49:27 +02:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/directory/room/.*$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~ ^/_matrix/client/(r0|v3|unstable)/capabilities$ {
2023-04-11 16:09:53 +02:00
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
2022-03-08 16:24:25 +01:00
## Encryption requests
location ~ ^/_matrix/client/(r0|v3|unstable)/keys/query$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-03-08 16:24:25 +01:00
location ~ ^/_matrix/client/(r0|v3|unstable)/keys/changes$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-03-08 16:24:25 +01:00
location ~ ^/_matrix/client/(r0|v3|unstable)/keys/claim$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
2021-08-01 14:34:00 +02:00
2022-03-08 16:24:25 +01:00
location ~ ^/_matrix/client/(r0|v3|unstable)/room_keys/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
2022-01-20 08:38:30 +01:00
2022-09-13 14:01:03 +02:00
location ~ ^/_matrix/client/(r0|v3|unstable)/keys/upload/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
2022-01-20 08:38:30 +01:00
2021-08-01 14:34:00 +02:00
## Registration/login requests
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/login$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/client/(r0|v3|unstable)/register$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2023-03-28 15:14:56 +02:00
location ~ ^/_matrix/client/(r0|v3|unstable)/register/available$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
2022-03-08 16:24:25 +01:00
location ~ ^/_matrix/client/v1/register/m.login.registration_token/validity$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-05 15:43:39 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2023-04-28 16:49:27 +02:00
location ~ ^/_matrix/client/(r0|v3|unstable)/password_policy$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
2021-08-01 14:34:00 +02:00
2022-01-20 08:38:30 +01:00
# STREAM WRITERS
2021-08-01 14:34:00 +02:00
## Event sending requests
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-20 08:38:30 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/send {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-20 08:38:30 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-20 08:38:30 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/(join|invite|leave|ban|unban|kick)$ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-20 08:38:30 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/join/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-20 08:38:30 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
2023-03-28 15:14:56 +02:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/knock/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
2022-01-08 14:44:18 +01:00
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/profile/ {
2021-08-01 14:34:00 +02:00
include include.d/synapse-proxy.conf;
2022-01-20 08:38:30 +01:00
proxy_pass http://generic_worker_lc;
2021-08-01 14:34:00 +02:00
}
## Typing
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/typing {
include include.d/synapse-proxy.conf;
proxy_pass http://additional;
}
## Device requests
location ~ ^/_matrix/client/(r0|v3|unstable)/sendToDevice/ {
include include.d/synapse-proxy.conf;
proxy_pass http://additional;
}
## Account data requests
location ~ ^/_matrix/client/(r0|v3|unstable)/.*/tags {
include include.d/synapse-proxy.conf;
proxy_pass http://additional;
}
location ~ ^/_matrix/client/(r0|v3|unstable)/.*/account_data {
include include.d/synapse-proxy.conf;
proxy_pass http://additional;
}
## Receipts requests
location ~ ^/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt {
include include.d/synapse-proxy.conf;
proxy_pass http://additional;
}
location ~ ^/_matrix/client/(r0|v3|unstable)/rooms/.*/read_markers {
include include.d/synapse-proxy.conf;
proxy_pass http://additional;
}
## Presence requests
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/presence/ {
include include.d/synapse-proxy.conf;
proxy_pass http://presence;
}