Class HttpClientConfig
Options used for communicating with the destination servers.
Inheritance
Implements
Namespace: Yarp.ReverseProxy.Configuration
Assembly: Yarp.ReverseProxy.dll
Syntax
public sealed class HttpClientConfig : object
Remarks
If you need a more granular approach, please use a custom implementation of IForwarderHttpClientFactory.
Fields
| Improve this Doc View SourceEmpty
An empty options instance.
Declaration
public static readonly HttpClientConfig Empty
Field Value
Type | Description |
---|---|
HttpClientConfig |
Properties
| Improve this Doc View SourceDangerousAcceptAnyServerCertificate
Indicates if destination server https certificate errors should be ignored. This should only be done when using self-signed certificates.
Declaration
public bool? DangerousAcceptAnyServerCertificate { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
EnableMultipleHttp2Connections
Gets or sets a value that indicates whether additional HTTP/2 connections can be established to the same server when the maximum number of concurrent streams is reached on all existing connections.
Declaration
public bool? EnableMultipleHttp2Connections { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
MaxConnectionsPerServer
Limits the number of connections used when communicating with the destination server.
Declaration
public int? MaxConnectionsPerServer { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
RequestHeaderEncoding
Allows overriding the default (ASCII) encoding for outgoing request headers.
Setting this value will in turn set
Declaration
public string? RequestHeaderEncoding { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.String> |
Remarks
Note: If you're using an encoding other than UTF-8 here, then you may also need to configure your server to accept request headers with such an encoding via the corresponding options for the server.
For example, when using Kestrel as the server, use
ResponseHeaderEncoding
Allows overriding the default (Latin1) encoding for incoming request headers.
Setting this value will in turn set
Declaration
public string? ResponseHeaderEncoding { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.String> |
Remarks
Note: If you're using an encoding other than ASCII here, then you may also need to configure your server to send response headers with such an encoding via the corresponding options for the server.
For example, when using Kestrel as the server, use
SslProtocols
What TLS protocols to use.
Declaration
public SslProtocols? SslProtocols { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<SslProtocols> |
WebProxy
Optional web proxy used when communicating with the destination server.
Declaration
public WebProxyConfig WebProxy { get; set; }
Property Value
Type | Description |
---|---|
WebProxyConfig |
Methods
| Improve this Doc View SourceEquals(HttpClientConfig)
Declaration
public bool Equals(HttpClientConfig other)
Parameters
Type | Name | Description |
---|---|---|
HttpClientConfig | other |
Returns
Type | Description |
---|---|
System.Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |