diff --git a/src/c#/GeneralUpdate.Core/Download/Executors/HttpDownloadExecutor.cs b/src/c#/GeneralUpdate.Core/Download/Executors/HttpDownloadExecutor.cs index bcba7b85..78a24482 100644 --- a/src/c#/GeneralUpdate.Core/Download/Executors/HttpDownloadExecutor.cs +++ b/src/c#/GeneralUpdate.Core/Download/Executors/HttpDownloadExecutor.cs @@ -5,6 +5,7 @@ using System.Threading; using System.Threading.Tasks; using GeneralUpdate.Core.Download.Abstractions; +using GeneralUpdate.Core.Network; using GeneralUpdate.Core.Download.Models; namespace GeneralUpdate.Core.Download.Executors; @@ -119,6 +120,11 @@ public async Task ExecuteAsync( new System.Net.Http.Headers.AuthenticationHeaderValue(asset.AuthScheme, asset.AuthToken); } + // Apply global auth provider and extra headers (e.g. X-Tenant-Id) from HttpClientProvider. + // This ensures download requests carry the same auth context as version validation + // and status reporting requests. + await HttpClientProvider.ApplyAuthAsync(request, token).ConfigureAwait(false); + using var cts = CancellationTokenSource.CreateLinkedTokenSource(token); cts.CancelAfter(_timeout);