Class RequestTransformContext
- Namespace
- Yarp.ReverseProxy.Transforms
- Assembly
- Yarp.ReverseProxy.dll
Transform state for use with RequestTransform
public class RequestTransformContext
- Inheritance
-
RequestTransformContext
- Inherited Members
Constructors
RequestTransformContext()
public RequestTransformContext()
Properties
CancellationToken
A CancellationToken indicating that the request is being aborted.
public CancellationToken CancellationToken { get; set; }
Property Value
DestinationPrefix
The URI prefix for the proxy request. This includes the scheme and host and can optionally include a port and path base. The 'Path' and 'Query' properties will be appended to this after the transforms have run. Changing this value can have side effects on load balancing and health checks.
public string DestinationPrefix { get; set; }
Property Value
HeadersCopied
Gets or sets if the request headers have been copied from the HttpRequest to the HttpRequestMessage and HttpContent. Transforms use this when searching for the current value of a header they should operate on.
public bool HeadersCopied { get; set; }
Property Value
HttpContext
The current request context.
public HttpContext HttpContext { get; init; }
Property Value
Path
The path to use for the proxy request.
public PathString Path { get; set; }
Property Value
Remarks
This will be prefixed by any PathBase specified for the destination server.
ProxyRequest
The outgoing proxy request. All field are initialized except for the 'RequestUri' and optionally headers. If no value is provided then the 'RequestUri' will be initialized using the updated 'DestinationPrefix', 'Path', and 'Query' properties after the transforms have run. The headers will be copied later when applying header transforms.
public HttpRequestMessage ProxyRequest { get; init; }
Property Value
Query
The query used for the proxy request.
public QueryTransformContext Query { get; set; }