envsdotnet-matrix-conf/etc/nginx/include.d/generic_worker.conf
2022-01-05 15:43:39 +01:00

350 lines
9.8 KiB
Plaintext

# Generic Worker
#
# note:
# http://localhost:8083 -> matrix-synchrotron-balancer
# generic_worker_lc -> upstream_proxy (least_conn)
# generic_worker_ih -> upstream_proxy (ip_hash)
#
## Sync requests
location ~* ^/_matrix/client/(v2_alpha|r0|v3)/sync$ {
include include.d/synapse-proxy.conf;
proxy_pass http://localhost:8083;
}
location ~* ^/_matrix/client/(api/v1|v2_alpha|r0|v3)/events$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/(api/v1|r0|v3)/initialSync$ {
include include.d/synapse-proxy.conf;
proxy_pass http://localhost:8083;
}
location ~* ^/_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync$ {
include include.d/synapse-proxy.conf;
proxy_pass http://localhost:8083;
}
## Federation requests
location ~* ^/_matrix/federation/v1/event/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/v1/state/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/v1/state_ids/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/v1/backfill/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/v1/get_missing_events/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/v1/publicRooms {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/v1/query/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/v1/make_join/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/v1/make_leave/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/v1/send_join/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/v2/send_join/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/v1/send_leave/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/v2/send_leave/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/v1/invite/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/v2/invite/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/v1/query_auth/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/v1/event_auth/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/v1/exchange_third_party_invite/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/v1/user/devices/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/v1/get_groups_publicised$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/key/v2/query {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/unstable/org.matrix.msc2946/spaces/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/federation/(v1|unstable/org.matrix.msc2946)/hierarchy/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
## Inbound federation transaction request
location ~* ^/_matrix/federation/v1/send/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_ih;
}
## Client API requests
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/createRoom$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/publicRooms$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/joined_members$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/context/.*$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/unstable/org.matrix.msc2946/rooms/.*/spaces$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/(v1|unstable/org.matrix.msc2946)/rooms/.*/hierarchy$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/unstable/im.nheko.summary/rooms/.*/summary$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/account/3pid$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/devices$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/keys/query$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/keys/changes$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/versions$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/voip/turnServer$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/joined_groups$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/publicised_groups$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/publicised_groups/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/event/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/joined_rooms$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/search$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
## Registration/login requests
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/login$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/(r0|v3|unstable)/register$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~* ^/_matrix/client/unstable/org.matrix.msc3231/register/org.matrix.msc3231.login.registration_token/validity$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
# STREAM WORKERS
## Event sending requests
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc_instancemap;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/send {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc_instancemap;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc_instancemap;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/(join|invite|leave|ban|unban|kick)$ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc_instancemap;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/join/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc_instancemap;
}
location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/profile/ {
include include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc_instancemap;
}
## Typing requests
#location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/typing {
# include include.d/synapse-proxy.conf;
# proxy_pass http://generic_worker_lc_instancemap;
#}
## Device requests
#location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/sendToDevice/ {
# include include.d/synapse-proxy.conf;
# proxy_pass http://generic_worker_lc_instancemap;
#}
## Account data requests
#location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/.*/tags {
# include include.d/synapse-proxy.conf;
# proxy_pass http://generic_worker_lc_instancemap;
#}
#location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/.*/account_data {
# include include.d/synapse-proxy.conf;
# proxy_pass http://generic_worker_lc_instancemap;
#}
## Receipts requests
#location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/receipt {
# include include.d/synapse-proxy.conf;
# proxy_pass http://generic_worker_lc_instancemap;
#}
#location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/read_markers {
# include include.d/synapse-proxy.conf;
# proxy_pass http://generic_worker_lc_instancemap;
#}
## Presence requests
#location ~* ^/_matrix/client/(api/v1|r0|v3|unstable)/presence/.*/status$ {
# include include.d/synapse-proxy.conf;
# proxy_pass http://generic_worker_lc_instancemap;
#}