Skip to content

Commit

Permalink
fix: removed origin header from get requests (#2352)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidejensen authored Oct 8, 2024
1 parent d63e2bd commit c394343
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions Explorer/Assets/DCL/WebRequests/GenericDownloadHandlerUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ namespace DCL.WebRequests
/// </summary>
public static class GenericDownloadHandlerUtils
{
private const string ORIGIN_HEADER_KEY = "Origin";
private const string ORIGIN_HEADER_VALUE = "explorer";

public delegate Exception CreateExceptionOnParseFail(Exception exception, string text);

public static Adapter<GenericPostRequest, GenericPostArguments> SignedFetchPostAsync(
Expand All @@ -45,20 +42,9 @@ CancellationToken ct
);
}

public static Adapter<GenericGetRequest, GenericGetArguments> GetAsync(
this IWebRequestController controller,
CommonArguments commonArguments,
CancellationToken ct,
ReportData reportData,
WebRequestHeadersInfo? headersInfo = null,
WebRequestSignInfo? signInfo = null,
ISet<long>? ignoreErrorCodes = null
)
{
headersInfo ??= new WebRequestHeadersInfo();
headersInfo.Value.Add(ORIGIN_HEADER_KEY, ORIGIN_HEADER_VALUE); // Probably in the future we will add this origin header also in the rest of requests
return new Adapter<GenericGetRequest, GenericGetArguments>(controller, commonArguments, default(GenericGetArguments), ct, reportData, headersInfo, signInfo, ignoreErrorCodes, GET_GENERIC);
}
public static Adapter<GenericGetRequest, GenericGetArguments> GetAsync(this IWebRequestController controller, CommonArguments commonArguments, CancellationToken ct, ReportData reportData, WebRequestHeadersInfo? headersInfo = null,
WebRequestSignInfo? signInfo = null, ISet<long>? ignoreErrorCodes = null) =>
new (controller, commonArguments, default(GenericGetArguments), ct, reportData, headersInfo, signInfo, ignoreErrorCodes, GET_GENERIC);

public static Adapter<GenericPostRequest, GenericPostArguments> PostAsync(
this IWebRequestController controller,
Expand Down

0 comments on commit c394343

Please sign in to comment.