Skip to content

Commit

Permalink
fix: proxy (#711)
Browse files Browse the repository at this point in the history
jaybeeelsdon authored Jul 2, 2024
1 parent be25fa4 commit d8bc44e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/BL/Services/MinioHelper.cs
Original file line number Diff line number Diff line change
@@ -265,9 +265,19 @@ public async Task<bool> FetchAndStoreObject(string url, string bucketName, strin
{


using (var httpClient = new HttpClient())
var proxy = new System.Net.WebProxy("http://192.168.10.15:8080");

// Configure the HttpClientHandler to use the proxy
var handler = new HttpClientHandler
{

Proxy = proxy,
UseProxy = true
};

// Create the HttpClient with the handler
using (var httpClient = new HttpClient(handler))
{

Log.Information("{Funtion} Step 1 url {Url}","FetchAndStoreObject", url);
var response = await httpClient.GetAsync(url);
if (!response.IsSuccessStatusCode)

0 comments on commit d8bc44e

Please sign in to comment.