Class ReverseProxyServiceCollectionExtensions
Extensions for
used to register the ReverseProxy's components.
Inheritance
System.Object
ReverseProxyServiceCollectionExtensions
Assembly: Yarp.ReverseProxy.dll
Syntax
public static class ReverseProxyServiceCollectionExtensions : object
Methods
|
Improve this Doc
View Source
AddConfigFilter<TService>(IReverseProxyBuilder)
Registers a singleton IProxyConfigFilter service. Multiple filters are allowed, and they will be run in registration order.
Declaration
public static IReverseProxyBuilder AddConfigFilter<TService>(this IReverseProxyBuilder builder)
where TService : class, IProxyConfigFilter
Parameters
Returns
Type Parameters
Name |
Description |
TService |
A class that implements IProxyConfigFilter.
|
|
Improve this Doc
View Source
AddDnsDestinationResolver(IReverseProxyBuilder, Nullable<Action<DnsDestinationResolverOptions>>)
Declaration
public static IReverseProxyBuilder AddDnsDestinationResolver(this IReverseProxyBuilder builder, Action<DnsDestinationResolverOptions>? configureOptions = null)
Parameters
Returns
|
Improve this Doc
View Source
AddHttpForwarder(IServiceCollection)
Declaration
public static IServiceCollection AddHttpForwarder(this IServiceCollection services)
Parameters
Type |
Name |
Description |
IServiceCollection |
services |
|
Returns
Type |
Description |
IServiceCollection |
|
|
Improve this Doc
View Source
AddReverseProxy(IServiceCollection)
Adds ReverseProxy's services to Dependency Injection.
Declaration
public static IReverseProxyBuilder AddReverseProxy(this IServiceCollection services)
Parameters
Type |
Name |
Description |
IServiceCollection |
services |
|
Returns
|
Improve this Doc
View Source
Declaration
public static IReverseProxyBuilder AddTransformFactory<T>(this IReverseProxyBuilder builder)
where T : class, ITransformFactory
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
AddTransforms(IReverseProxyBuilder, Action<TransformBuilderContext>)
Declaration
public static IReverseProxyBuilder AddTransforms(this IReverseProxyBuilder builder, Action<TransformBuilderContext> action)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public static IReverseProxyBuilder AddTransforms<T>(this IReverseProxyBuilder builder)
where T : class, ITransformProvider
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
ConfigureHttpClient(IReverseProxyBuilder, Action<ForwarderHttpClientContext, SocketsHttpHandler>)
Provides a callback to customize settings used for proxying requests.
This will be called each time a cluster is added or changed. Cluster settings are applied to the handler before
the callback. Custom data can be provided in the cluster metadata.
Declaration
public static IReverseProxyBuilder ConfigureHttpClient(this IReverseProxyBuilder builder, Action<ForwarderHttpClientContext, SocketsHttpHandler> configure)
Parameters
Returns
|
Improve this Doc
View Source
LoadFromConfig(IReverseProxyBuilder, IConfiguration)
Loads routes and endpoints from config.
Declaration
public static IReverseProxyBuilder LoadFromConfig(this IReverseProxyBuilder builder, IConfiguration config)
Parameters
Returns