Class RequestHeaderXForwardedForTransform
- Namespace
- Yarp.ReverseProxy.Transforms
- Assembly
- Yarp.ReverseProxy.dll
Sets or appends the X-Forwarded-For header with the previous clients's IP address.
public class RequestHeaderXForwardedForTransform : RequestTransform
- Inheritance
-
RequestHeaderXForwardedForTransform
- Inherited Members
Constructors
RequestHeaderXForwardedForTransform(string, ForwardedTransformActions)
Creates a new transform.
public RequestHeaderXForwardedForTransform(string headerName, ForwardedTransformActions action)
Parameters
headerNamestringThe header name.
actionForwardedTransformActionsAction to applied to the header.
Methods
ApplyAsync(RequestTransformContext)
public override ValueTask ApplyAsync(RequestTransformContext context)
Parameters
contextRequestTransformContext