From c054a81b1ca22472beaac40a6a47262e685b4dda Mon Sep 17 00:00:00 2001 From: Moritz 'e1mo' Fromm Date: Thu, 31 Aug 2023 22:12:19 +0200 Subject: [PATCH] matrix: Fix login redirect loop Maybe/probably a problem with the hostname / IP snypase detected for the request. --- services/matrix/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/services/matrix/default.nix b/services/matrix/default.nix index 7261c1d..4a351ff 100644 --- a/services/matrix/default.nix +++ b/services/matrix/default.nix @@ -43,9 +43,15 @@ in { ''; # Forward all Matrix API calls to the synapse Matrix homeserver. A trailing slash # *must not* be used here. - locations."/_matrix".proxyPass = "http://[::1]:${toString matrixPort}"; + locations."/_matrix" = { + proxyPass = "http://[::1]:${toString matrixPort}"; + recommendedProxySettings = true; + }; # Forward requests for e.g. SSO and password-resets. - locations."/_synapse/client".proxyPass = "http://[::1]:${toString matrixPort}"; + locations."/_synapse/client" = { + proxyPass = "http://[::1]:${toString matrixPort}"; + recommendedProxySettings = true; + }; # # Allow public access to the synapse admin API # # The docs advise against leaving this open to just everyone. That's why this currently is commented out # # if admin things need to be done, it's required to SSH to the server and then direct all admin requests to