Dela via


ForwardedTransformExtensions.WithTransformXForwarded Method

Definition

Clones the route and adds the transform which will add X-Forwarded-* headers.

public static Yarp.ReverseProxy.Configuration.RouteConfig WithTransformXForwarded (this Yarp.ReverseProxy.Configuration.RouteConfig route, string headerPrefix = "X-Forwarded-", Yarp.ReverseProxy.Transforms.ForwardedTransformActions xDefault = Yarp.ReverseProxy.Transforms.ForwardedTransformActions.Set, Yarp.ReverseProxy.Transforms.ForwardedTransformActions? xFor = default, Yarp.ReverseProxy.Transforms.ForwardedTransformActions? xHost = default, Yarp.ReverseProxy.Transforms.ForwardedTransformActions? xProto = default, Yarp.ReverseProxy.Transforms.ForwardedTransformActions? xPrefix = default);
static member WithTransformXForwarded : Yarp.ReverseProxy.Configuration.RouteConfig * string * Yarp.ReverseProxy.Transforms.ForwardedTransformActions * Nullable<Yarp.ReverseProxy.Transforms.ForwardedTransformActions> * Nullable<Yarp.ReverseProxy.Transforms.ForwardedTransformActions> * Nullable<Yarp.ReverseProxy.Transforms.ForwardedTransformActions> * Nullable<Yarp.ReverseProxy.Transforms.ForwardedTransformActions> -> Yarp.ReverseProxy.Configuration.RouteConfig
<Extension()>
Public Function WithTransformXForwarded (route As RouteConfig, Optional headerPrefix As String = "X-Forwarded-", Optional xDefault As ForwardedTransformActions = Yarp.ReverseProxy.Transforms.ForwardedTransformActions.Set, Optional xFor As Nullable(Of ForwardedTransformActions) = Nothing, Optional xHost As Nullable(Of ForwardedTransformActions) = Nothing, Optional xProto As Nullable(Of ForwardedTransformActions) = Nothing, Optional xPrefix As Nullable(Of ForwardedTransformActions) = Nothing) As RouteConfig

Parameters

route
RouteConfig
headerPrefix
String

Returns

Applies to