Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,21 @@ public class SignedHttpRequestHandler
};

private readonly Uri _baseUriHelper = new Uri("http://localhost", UriKind.Absolute);
internal readonly HttpClient _defaultHttpClient = new HttpClient();

// Redirects are disabled on the default client. Consumers who need
// different behaviour can supply their own client via
// SignedHttpRequestValidationParameters.HttpClientProvider.
internal readonly HttpClient _defaultHttpClient = new HttpClient(
new HttpClientHandler { AllowAutoRedirect = false })
{
Timeout = TimeSpan.FromSeconds(10)
Comment thread
iNinja marked this conversation as resolved.
};

/// <summary>
/// Initializes a new instance of <see cref="SignedHttpRequestHandler"/>.
/// </summary>
public SignedHttpRequestHandler()
{
_defaultHttpClient.Timeout = TimeSpan.FromSeconds(10);
}

#region SignedHttpRequest creation
Expand Down