anonymousland-synapse-docke.../swag/nginx/include.d/sync_worker.conf
2022-11-04 16:28:02 -04:00

31 lines
882 B
Plaintext

# Choose sync worker based on the existence of "since" query parameter
map $arg_since $sync {
default sync_worker;
'' sync_init;
}
# Sync initial/normal
location ~ ^/_matrix/client/(r0|v3)/sync$ {
include snippets/matrix-proxy-headers.conf;
proxy_pass http://$sync;
proxy_read_timeout 1h;
}
# Normal sync
location ~ ^/_matrix/client/(api/v1|r0|v3)/events$ {
include snippets/matrix-proxy-headers.conf;
proxy_pass http://sync_worker;
}
# Initial_sync
location ~ ^/_matrix/client/(api/v1|r0|v3)/initialSync$ {
include snippets/matrix-proxy-headers.conf;
proxy_pass http://sync_init;
proxy_read_timeout 1h;
}
location ~ ^/_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync$ {
include snippets/matrix-proxy-headers.conf;
proxy_pass http://sync_init;
proxy_read_timeout 1h;
}