From 2fb46b3bb9e825727448b6411921f4cfd45c21f2 Mon Sep 17 00:00:00 2001 From: Rory& Date: Tue, 9 Dec 2025 14:44:02 +0100 Subject: Drop MXAE_UPSTREAM header from requests --- LibMatrix/Homeservers/FederationClient.cs | 5 +---- LibMatrix/Homeservers/RemoteHomeServer.cs | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'LibMatrix') diff --git a/LibMatrix/Homeservers/FederationClient.cs b/LibMatrix/Homeservers/FederationClient.cs index 9760e20..310fa93 100644 --- a/LibMatrix/Homeservers/FederationClient.cs +++ b/LibMatrix/Homeservers/FederationClient.cs @@ -10,7 +10,6 @@ public class FederationClient { BaseAddress = new Uri(proxy?.TrimEnd('/') ?? federationEndpoint.TrimEnd('/')), // Timeout = TimeSpan.FromSeconds(120) // TODO: Re-implement this }; - if (proxy is not null) HttpClient.DefaultRequestHeaders.Add("MXAE_UPSTREAM", federationEndpoint); } public MatrixHttpClient HttpClient { get; set; } @@ -18,6 +17,4 @@ public class FederationClient { public async Task GetServerVersionAsync() => await HttpClient.GetFromJsonAsync("/_matrix/federation/v1/version"); public async Task> GetServerKeysAsync() => await HttpClient.GetFromJsonAsync>("/_matrix/key/v2/server"); -} - - +} \ No newline at end of file diff --git a/LibMatrix/Homeservers/RemoteHomeServer.cs b/LibMatrix/Homeservers/RemoteHomeServer.cs index af84be2..7c55d57 100644 --- a/LibMatrix/Homeservers/RemoteHomeServer.cs +++ b/LibMatrix/Homeservers/RemoteHomeServer.cs @@ -23,7 +23,6 @@ public class RemoteHomeserver { // Timeout = TimeSpan.FromSeconds(300) // TODO: Re-implement this }; - if (proxy is not null) ClientHttpClient.DefaultRequestHeaders.Add("MXAE_UPSTREAM", serverName); if (!string.IsNullOrWhiteSpace(wellKnownUris.Server)) FederationClient = new FederationClient(WellKnownUris.Server!, proxy); Auth = new(this); -- cgit 1.5.1