mirror of
https://github.com/2dust/v2rayN.git
synced 2026-10-31 01:24:59 +03:00
Fix subscription requests missing Accept header (#10095)
This commit is contained in:
@@ -11,6 +11,8 @@ public class DownloadService
|
||||
|
||||
public event ErrorEventHandler? Error;
|
||||
|
||||
public string? AcceptHeader { get; init; }
|
||||
|
||||
private static readonly string _tag = "DownloadService";
|
||||
|
||||
/// <summary>
|
||||
@@ -253,6 +255,10 @@ public class DownloadService
|
||||
userAgent = Utils.GetVersion(false);
|
||||
}
|
||||
client.DefaultRequestHeaders.UserAgent.TryParseAdd(userAgent);
|
||||
if (AcceptHeader.IsNotEmpty())
|
||||
{
|
||||
client.DefaultRequestHeaders.Accept.ParseAdd(AcceptHeader);
|
||||
}
|
||||
|
||||
Uri uri = new(url);
|
||||
//Authorization Header
|
||||
|
||||
Reference in New Issue
Block a user