This commit is contained in:
deathrow 2022-12-05 15:43:41 -05:00
parent 75f64aa4d2
commit d391046431
No known key found for this signature in database
GPG key ID: FF39D67A22069F73
6 changed files with 126 additions and 0 deletions

View file

@ -0,0 +1,22 @@
# Typing
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/typing {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://additional1;
}
# Device requests
location ~ ^/_matrix/client/(r0|v3|unstable)/sendToDevice/ {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://additional1;
}
# Account data requests
location ~ ^/_matrix/client/(r0|v3|unstable)/.*/tags {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://additional1;
}
location ~ ^/_matrix/client/(r0|v3|unstable)/.*/account_data {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://additional1;
}

View file

@ -0,0 +1,33 @@
# Event sending requests
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/send {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state/ {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/(join|invite|leave|ban|unban|kick)$ {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/join/ {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/profile/ {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}

View file

@ -0,0 +1,47 @@
# GET Requests
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/pushrules/ {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/messages$ {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
# For all SSO providers
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/login/sso/redirect {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://sso_worker_lc;
}
location ~ ^/_synapse/client/p^/_synapse/client/oidc/callback$ew_user_consent$ {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://sso_worker_lc;
}
location ~ ^/_synapse/client/sso_register$ {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://sso_worker_lc;
}
# OpenID Connect requests
location ~ ^/_synapse/client/oidc/callback$ {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
# SAML requests
location ~ ^/_synapse/client/saml2/authn_response$ {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}
# CAS requests.
location ~ ^/_matrix/client/(api/v1|r0|v3|unstable)/login/cas/ticket$ {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}

View file

@ -0,0 +1,4 @@
location ^~ /_matrix/media {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://generic_worker_lc;
}

View file

@ -0,0 +1,10 @@
# Receipts requests
location ~ ^/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://additional2;
}
location ~ ^/_matrix/client/(r0|v3|unstable)/rooms/.*/read_markers {
include /config/nginx/include.d/synapse-proxy.conf;
proxy_pass http://additional2;
}

View file

@ -14,6 +14,16 @@ upstream generic_worker_lc {
server synapse-generic-worker-4:8081;
}
upstream additional1_worker_lc {
least_conn;
server additional1:8081;
}
upstream sso_worker_lc {
least_conn;
server synapse-generic-worker-4:8081;
}
# extract username from token get parameter
map $arg_access_token $token_from_arg {
default $arg_access_token;