Skip to content

Commit

Permalink
Add User-Agent in headers for CloudFlare
Browse files Browse the repository at this point in the history
  • Loading branch information
domialex committed Oct 16, 2020
1 parent a9960d0 commit 3e5092c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/Sidekick.Business/Apis/Poe/Trade/PoeTradeClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public PoeTradeClient(ILogger logger,
this.languageProvider = languageProvider;
client = httpClientFactory.CreateClient();
client.DefaultRequestHeaders.TryAddWithoutValidation("X-Powered-By", "Sidekick");
client.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", "Sidekick");
}

public JsonSerializerOptions Options
Expand Down
1 change: 1 addition & 0 deletions src/Sidekick.Business/Http/HttpClientProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public HttpClient HttpClient
{
var client = httpClientFactory.CreateClient();
client.DefaultRequestHeaders.TryAddWithoutValidation("X-Powered-By", "Sidekick");
client.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", "Sidekick");
return client;
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/Sidekick/Sidekick.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationIcon>Resources\ExaltedOrb.ico</ApplicationIcon>
<AssemblyVersion>1.1.1.0</AssemblyVersion>
<FileVersion>1.1.1.0</FileVersion>
<Version>1.1.1</Version>
<AssemblyVersion>1.1.2.0</AssemblyVersion>
<FileVersion>1.1.2.0</FileVersion>
<Version>1.1.2</Version>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Description>A Path of Exile helper that shows item prices using the official Path of Exile Trade API.</Description>
<PackageProjectUrl>https://github.com/domialex/Sidekick</PackageProjectUrl>
Expand Down

0 comments on commit 3e5092c

Please sign in to comment.