Skip to content

Commit

Permalink
Also send version hash header under more accepted convention of name
Browse files Browse the repository at this point in the history
  • Loading branch information
bdach committed Jul 17, 2024
1 parent 3006bae commit 2a601ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion osu.Game/Online/HubClientConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class HubClientConnector : PersistentEndpointClientConnector, IHubClientC
{
public const string SERVER_SHUTDOWN_MESSAGE = "Server is shutting down.";

public const string VERSION_HASH_HEADER = @"OsuVersionHash";
public const string VERSION_HASH_HEADER = @"X-Osu-Version-Hash";
public const string CLIENT_SESSION_ID_HEADER = @"X-Client-Session-ID";

/// <summary>
Expand Down Expand Up @@ -72,6 +72,8 @@ protected override Task<PersistentEndpointClient> BuildConnectionAsync(Cancellat
}
options.Headers.Add(@"Authorization", @$"Bearer {API.AccessToken}");
// non-standard header name kept for backwards compatibility, can be removed after server side has migrated to `VERSION_HASH_HEADER`
options.Headers.Add(@"OsuVersionHash", versionHash);
options.Headers.Add(VERSION_HASH_HEADER, versionHash);
options.Headers.Add(CLIENT_SESSION_ID_HEADER, API.SessionIdentifier.ToString());
});
Expand Down

0 comments on commit 2a601ce

Please sign in to comment.