Skip to content

Commit

Permalink
Add proxy support to the Cosmos Extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Stechschulte, Adam M committed Jun 7, 2024
1 parent 3fc3f32 commit e4ca5dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Reflection;
using Azure.Core;
using System.Text.RegularExpressions;
using System.Net;

namespace Cosmos.DataTransfer.CosmosExtension
{
Expand All @@ -31,6 +32,10 @@ public static CosmosClient CreateClient(CosmosSettingsBase settings, string disp
EnableContentResponseOnWrite = false,
Serializer = cosmosSerializer,
};

if (!string.IsNullOrEmpty(settings.WebProxy)){
clientOptions.WebProxy = new WebProxy(settings.WebProxy);
}

CosmosClient? cosmosClient;
if (settings.UseRbacAuth)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public abstract class CosmosSettingsBase : IValidatableObject
[Required]
public string? Container { get; set; }
public ConnectionMode ConnectionMode { get; set; } = ConnectionMode.Gateway;

public string? WebProxy { get; set; }
public bool UseRbacAuth { get; set; }
public string? AccountEndpoint { get; set; }
public bool EnableInteractiveCredentials { get; set; } = true;
Expand Down

0 comments on commit e4ca5dc

Please sign in to comment.