From f0368c9a618202a7f5d4ea529104db2efa5c29d8 Mon Sep 17 00:00:00 2001 From: yuri Date: Sat, 7 Oct 2023 02:42:00 +0200 Subject: [PATCH] Set locations priority for matrix reverse proxy --- config/hosts/matrix/nginx.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/config/hosts/matrix/nginx.nix b/config/hosts/matrix/nginx.nix index 234362d..1b28649 100644 --- a/config/hosts/matrix/nginx.nix +++ b/config/hosts/matrix/nginx.nix @@ -17,6 +17,10 @@ } ]; locations = { + "~ ^/(client/|_matrix/client/unstable/org.matrix.msc3575/sync)" = { + proxyPass = "http://127.0.0.1:8009"; + priority = 999; + }; "~ ^(/_matrix|/_synapse/client)" = { proxyPass = "http://127.0.0.1:8008"; extraConfig = '' @@ -25,9 +29,6 @@ client_max_body_size ${config.services.matrix-synapse.settings.max_upload_size}; ''; }; - "~ ^/(client/|_matrix/client/unstable/org.matrix.msc3575/sync)" = { - proxyPass = "http://127.0.0.1:8009"; - }; }; extraConfig = '' listen 0.0.0.0:8443 http2 ssl proxy_protocol;