Dela via


TransformBuilderContext Class

Definition

State used when building transforms for the given route.

public class TransformBuilderContext
type TransformBuilderContext = class
Public Class TransformBuilderContext
Inheritance
TransformBuilderContext

Constructors

TransformBuilderContext()

Properties

Cluster

The cluster config used by the route. This may be null if the route is not currently paired with a cluster.

CopyRequestHeaders

Indicates if request headers should all be copied to the proxy request before transforms are applied.

CopyResponseHeaders

Indicates if response headers should all be copied to the client response before transforms are applied.

CopyResponseTrailers

Indicates if response trailers should all be copied to the client response before transforms are applied.

RequestTransforms

Add request transforms here for the given route.

ResponseTrailersTransforms

Add response trailers transforms here for the given route.

ResponseTransforms

Add response transforms here for the given route.

Route

The route these transforms will be associated with.

Services

Application services that can be used to construct transforms.

UseDefaultForwarders

Indicates if default x-forwarded-* transforms should be added to this route. Disable this if you do not want x-forwarded-* headers or have configured your own.

Extension Methods

AddClientCertHeader(TransformBuilderContext, String)

Adds the transform which will set the given header with the Base64 encoded client certificate.

AddForwarded(TransformBuilderContext, Boolean, Boolean, NodeFormat, NodeFormat, ForwardedTransformActions)

Adds the transform which will add the Forwarded header as defined by RFC 7239.

AddXForwarded(TransformBuilderContext, ForwardedTransformActions)

Adds the transform which will add X-Forwarded-* request headers.

AddXForwardedFor(TransformBuilderContext, String, ForwardedTransformActions)

Adds the transform which will add X-Forwarded-For request header.

AddXForwardedHost(TransformBuilderContext, String, ForwardedTransformActions)

Adds the transform which will add X-Forwarded-Host request header.

AddXForwardedPrefix(TransformBuilderContext, String, ForwardedTransformActions)

Adds the transform which will add X-Forwarded-Prefix request header.

AddXForwardedProto(TransformBuilderContext, String, ForwardedTransformActions)

Adds the transform which will add X-Forwarded-Proto request header.

AddHttpMethodChange(TransformBuilderContext, String, String)

Adds the transform that will replace the HTTP method if it matches.

AddPathPrefix(TransformBuilderContext, PathString)

Adds the transform which will prefix the request path with the given value.

AddPathRemovePrefix(TransformBuilderContext, PathString)

Adds the transform which will remove the matching prefix from the request path.

AddPathRouteValues(TransformBuilderContext, PathString)

Clones the route and adds the transform which will set the request path with the given value.

AddPathSet(TransformBuilderContext, PathString)

Adds the transform which sets the request path with the given value.

AddQueryRemoveKey(TransformBuilderContext, String)

Adds the transform that will remove the given query key.

AddQueryRouteValue(TransformBuilderContext, String, String, Boolean)

Adds the transform that will append or set the query parameter from a route value.

AddQueryValue(TransformBuilderContext, String, String, Boolean)

Adds the transform that will append or set the query parameter from the given value.

AddOriginalHost(TransformBuilderContext, Boolean)

Adds the transform which will copy or remove the original host header.

AddRequestHeader(TransformBuilderContext, String, String, Boolean)

Adds the transform which will append or set the request header.

AddRequestHeaderRemove(TransformBuilderContext, String)

Adds the transform which will remove the request header.

AddRequestHeaderRouteValue(TransformBuilderContext, String, String, Boolean)

Adds the transform which will append or set the request header from a route value.

AddRequestHeadersAllowed(TransformBuilderContext, String[])

Adds the transform which will only copy the allowed request headers. Other transforms that modify or append to existing headers may be affected if not included in the allow list.

AddResponseHeader(TransformBuilderContext, String, String, Boolean, ResponseCondition)

Adds the transform which will append or set the response header.

AddResponseHeaderRemove(TransformBuilderContext, String, ResponseCondition)

Adds the transform which will remove the response header.

AddResponseHeadersAllowed(TransformBuilderContext, String[])

Adds the transform which will only copy the allowed response headers. Other transforms that modify or append to existing headers may be affected if not included in the allow list.

AddResponseTrailer(TransformBuilderContext, String, String, Boolean, ResponseCondition)

Adds the transform which will append or set the response trailer.

AddResponseTrailerRemove(TransformBuilderContext, String, ResponseCondition)

Adds the transform which will remove the response trailer.

AddResponseTrailersAllowed(TransformBuilderContext, String[])

Adds the transform which will only copy the allowed response trailers. Other transforms that modify or append to existing trailers may be affected if not included in the allow list.

AddRequestTransform(TransformBuilderContext, Func<RequestTransformContext,ValueTask>)

Adds a transform Func that runs on each request for the given route.

AddResponseTrailersTransform(TransformBuilderContext, Func<ResponseTrailersTransformContext,ValueTask>)

Adds a transform Func that runs on each response for the given route.

AddResponseTransform(TransformBuilderContext, Func<ResponseTransformContext,ValueTask>)

Adds a transform Func that runs on each response for the given route.

Applies to