diff options
Diffstat (limited to 'modules/services')
-rw-r--r-- | modules/services/matrix-homeserver.nix | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/services/matrix-homeserver.nix b/modules/services/matrix-homeserver.nix index 6089b12..12befb9 100644 --- a/modules/services/matrix-homeserver.nix +++ b/modules/services/matrix-homeserver.nix @@ -147,12 +147,13 @@ in ]; extraConfig = '' proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; proxy_read_timeout 600; - client_max_body_size 50M; + client_max_body_size ${config.services.matrix-synapse.settings.max_upload_size}; ''; - locations."/_matrix".proxyPass = "http://[::1]:${toString httpPort}"; - locations."/_synapse".proxyPass = "http://[::1]:${toString httpPort}"; + + locations."~* ^(\\/_matrix|\\/_synapse\\/client)".proxyPass = "http://[::1]:${toString httpPort}"; }; services.nginx.virtualHosts.${cfg.domain} = |