fix: matrix auth routes

This commit is contained in:
Dominik Polakovics Polakovics 2026-03-04 13:44:05 +01:00
parent 5418df411c
commit 80fe8c2641

View file

@ -363,8 +363,8 @@ in {
locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig; locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig;
# MAS compatibility endpoints (must be before /_matrix catch-all) # MAS compatibility endpoints (must be before /_matrix catch-all)
locations."~ ^/_matrix/client/(r0|v3)/login$".proxyPass = "http://127.0.0.1:8081"; locations."~ ^/_matrix/client/(r0|v3)/login".proxyPass = "http://127.0.0.1:8081";
locations."~ ^/_matrix/client/(r0|v3)/logout$".proxyPass = "http://127.0.0.1:8081"; locations."~ ^/_matrix/client/(r0|v3)/logout".proxyPass = "http://127.0.0.1:8081";
locations."~ ^/_matrix/client/(r0|v3)/refresh$".proxyPass = "http://127.0.0.1:8081"; locations."~ ^/_matrix/client/(r0|v3)/refresh$".proxyPass = "http://127.0.0.1:8081";
# MAS own endpoints # MAS own endpoints
@ -381,6 +381,8 @@ in {
locations."/recovery".proxyPass = "http://127.0.0.1:8081"; locations."/recovery".proxyPass = "http://127.0.0.1:8081";
locations."/login".proxyPass = "http://127.0.0.1:8081"; locations."/login".proxyPass = "http://127.0.0.1:8081";
locations."/change-password".proxyPass = "http://127.0.0.1:8081"; locations."/change-password".proxyPass = "http://127.0.0.1:8081";
locations."/complete-compat-sso".proxyPass = "http://127.0.0.1:8081";
locations."/logout".proxyPass = "http://127.0.0.1:8081";
# LiveKit JWT service for MatrixRTC # LiveKit JWT service for MatrixRTC
locations."^~ /livekit/jwt/" = { locations."^~ /livekit/jwt/" = {
@ -399,7 +401,15 @@ in {
# Synapse endpoints # Synapse endpoints
locations."/_matrix".proxyPass = "http://[::1]:8008"; locations."/_matrix".proxyPass = "http://[::1]:8008";
locations."/_synapse/client".proxyPass = "http://[::1]:8008"; locations."/_synapse/client" = {
proxyPass = "http://[::1]:8008";
extraConfig = ''
# MSC4108 rendezvous relies on strong ETag comparison;
# gzip can break it, so disable compression here.
gzip off;
'';
};
locations."/_synapse/mas".proxyPass = "http://[::1]:8008";
}; };
# Internal proxy for bridges: routes login/auth to MAS, everything else to Synapse. # Internal proxy for bridges: routes login/auth to MAS, everything else to Synapse.
@ -407,8 +417,8 @@ in {
# /_matrix/client/v3/login when MAS is enabled. # /_matrix/client/v3/login when MAS is enabled.
services.nginx.virtualHosts."matrix-internal" = { services.nginx.virtualHosts."matrix-internal" = {
listen = [{ addr = "127.0.0.1"; port = 8009; }]; listen = [{ addr = "127.0.0.1"; port = 8009; }];
locations."~ ^/_matrix/client/(r0|v3)/login$".proxyPass = "http://127.0.0.1:8081"; locations."~ ^/_matrix/client/(r0|v3)/login".proxyPass = "http://127.0.0.1:8081";
locations."~ ^/_matrix/client/(r0|v3)/logout$".proxyPass = "http://127.0.0.1:8081"; locations."~ ^/_matrix/client/(r0|v3)/logout".proxyPass = "http://127.0.0.1:8081";
locations."~ ^/_matrix/client/(r0|v3)/refresh$".proxyPass = "http://127.0.0.1:8081"; locations."~ ^/_matrix/client/(r0|v3)/refresh$".proxyPass = "http://127.0.0.1:8081";
locations."/_matrix".proxyPass = "http://[::1]:8008"; locations."/_matrix".proxyPass = "http://[::1]:8008";
locations."/_synapse/client".proxyPass = "http://[::1]:8008"; locations."/_synapse/client".proxyPass = "http://[::1]:8008";
@ -444,6 +454,7 @@ in {
allow = true; allow = true;
default = true; default = true;
require = true; require = true;
self_sign = true;
pickle_key = "$MAUTRIX_WHATSAPP_PICKLE_KEY"; pickle_key = "$MAUTRIX_WHATSAPP_PICKLE_KEY";
msc4190 = true; msc4190 = true;
}; };
@ -474,6 +485,7 @@ in {
allow = true; allow = true;
default = true; default = true;
require = true; require = true;
self_sign = true;
pickle_key = "$MAUTRIX_SIGNAL_PICKLE_KEY"; pickle_key = "$MAUTRIX_SIGNAL_PICKLE_KEY";
msc4190 = true; msc4190 = true;
}; };
@ -520,6 +532,7 @@ in {
allow = true; allow = true;
default = true; default = true;
require = true; require = true;
self_sign = true;
pickle_key = "$MAUTRIX_DISCORD_PICKLE_KEY"; pickle_key = "$MAUTRIX_DISCORD_PICKLE_KEY";
msc4190 = true; msc4190 = true;
}; };
@ -610,6 +623,7 @@ in {
allow = true; allow = true;
default = true; default = true;
require = true; require = true;
self_sign = true;
pickle_key = "$MAUTRIX_MATTERMOST_PICKLE_KEY"; pickle_key = "$MAUTRIX_MATTERMOST_PICKLE_KEY";
msc4190 = true; msc4190 = true;
}; };