Class RequestHeaderXForwardedForTransform
Sets or appends the X-Forwarded-For header with the previous client's IP address.
Inherited Members
Namespace: Yarp.ReverseProxy.Transforms
Assembly: Yarp.ReverseProxy.dll
Syntax
public class RequestHeaderXForwardedForTransform : RequestTransform
Constructors
| Improve this Doc View SourceRequestHeaderXForwardedForTransform(String, ForwardedTransformActions)
Creates a new transform.
Declaration
public RequestHeaderXForwardedForTransform(string headerName, ForwardedTransformActions action)
Parameters
Type | Name | Description |
---|---|---|
System.String | headerName | The header name. |
ForwardedTransformActions | action | Action to applied to the header. |
Methods
| Improve this Doc View SourceApplyAsync(RequestTransformContext)
Transforms any of the available fields before building the outgoing request.
Declaration
public override ValueTask ApplyAsync(RequestTransformContext context)
Parameters
Type | Name | Description |
---|---|---|
RequestTransformContext | context |
Returns
Type | Description |
---|---|
ValueTask |