Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

Aspire.Hosting.Yarp

Official
📦 Aspire.Hosting.Yarpv17.0.0
Import pathapphost/modules/aspire
55Functions
17Types

Handles

DTOs

Enums

Functions

YarpRoute

methodWithMatch
Set the parameters used to match requests.
WithMatch(match *YarpRouteMatch) YarpRoute
methodWithMatchHeaders
Only match requests that contain all of these headers.
WithMatchHeaders(headers []*YarpRouteHeaderMatch) YarpRoute
methodWithMatchHosts
Only match requests with the given Host header. Supports wildcards and ports. For unicode host names, do not use punycode.
WithMatchHosts(hosts []string) YarpRoute
methodWithMatchMethods
Only match requests that use these optional HTTP methods. E.g. GET, POST.
WithMatchMethods(methods []string) YarpRoute
methodWithMatchPath
Only match requests with the given Path pattern.
WithMatchPath(path string) YarpRoute
methodWithMatchRouteQueryParameter
Only match requests that contain all of these query parameters.
WithMatchRouteQueryParameter(queryParameters []*YarpRouteQueryParameterMatch) YarpRoute
methodWithMaxRequestBodySize
Set the MaxRequestBodySize for the destination
WithMaxRequestBodySize(maxRequestBodySize float64) YarpRoute
methodWithMetadata
Set the Metadata of the destination
WithMetadata(metadata map[string]string) YarpRoute
methodWithOrder
Set the order for the destination
WithOrder(order *float64) YarpRoute
methodWithTransform
Add a new transform to the destination.
WithTransform(transform map[string]string) YarpRoute
methodWithTransformClientCertHeader
Adds the transform which will set the given header with the Base64 encoded client certificate.
WithTransformClientCertHeader(headerName string) YarpRoute
methodWithTransformCopyRequestHeaders
Adds the transform which will enable or suppress copying request headers to the proxy request.
WithTransformCopyRequestHeaders(options ...*WithTransformCopyRequestHeadersOptions) YarpRoute
methodWithTransformCopyResponseHeaders
Adds the transform which will enable or suppress copying response headers to the client response.
WithTransformCopyResponseHeaders(options ...*WithTransformCopyResponseHeadersOptions) YarpRoute
methodWithTransformCopyResponseTrailers
Adds the transform which will enable or suppress copying response trailers to the client response.
WithTransformCopyResponseTrailers(options ...*WithTransformCopyResponseTrailersOptions) YarpRoute
methodWithTransformForwarded
Adds the transform which will add the Forwarded header as defined by RFC 7239.
WithTransformForwarded(options ...*WithTransformForwardedOptions) YarpRoute
methodWithTransformHttpMethodChange
Adds the transform that will replace the HTTP method if it matches.
WithTransformHttpMethodChange(fromHttpMethod string, toHttpMethod string) YarpRoute
methodWithTransformPathPrefix
Adds the transform which will prefix the request path with the given value.
WithTransformPathPrefix(prefix string) YarpRoute
methodWithTransformPathRemovePrefix
Adds the transform which will remove the matching prefix from the request path.
WithTransformPathRemovePrefix(prefix string) YarpRoute
methodWithTransformPathRouteValues
Adds the transform which will set the request path with route values.
WithTransformPathRouteValues(pattern string) YarpRoute
methodWithTransformPathSet
Adds the transform which sets the request path with the given value.
WithTransformPathSet(path string) YarpRoute
methodWithTransformQueryRemoveKey
Adds the transform that will remove the given query key.
WithTransformQueryRemoveKey(queryKey string) YarpRoute
methodWithTransformQueryRouteValue
Adds the transform that will append or set the query parameter from a route value.
WithTransformQueryRouteValue(queryKey string, routeValueKey string, options ...*WithTransformQueryRouteValueOptions) YarpRoute
methodWithTransformQueryValue
Adds the transform that will append or set the query parameter from the given value.
WithTransformQueryValue(queryKey string, value string, options ...*WithTransformQueryValueOptions) YarpRoute
methodWithTransformRequestHeader
Adds the transform which will append or set the request header.
WithTransformRequestHeader(headerName string, value string, options ...*WithTransformRequestHeaderOptions) YarpRoute
methodWithTransformRequestHeaderRemove
Adds the transform which will remove the request header.
WithTransformRequestHeaderRemove(headerName string) YarpRoute
methodWithTransformRequestHeaderRouteValue
Adds the transform which will append or set the request header from a route value.
WithTransformRequestHeaderRouteValue(headerName string, routeValueKey string, options ...*WithTransformRequestHeaderRouteValueOptions) YarpRoute
methodWithTransformRequestHeadersAllowed
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.
WithTransformRequestHeadersAllowed(allowedHeaders []string) YarpRoute
methodWithTransformResponseHeader
Adds the transform which will append or set the response header.
WithTransformResponseHeader(headerName string, value string, options ...*WithTransformResponseHeaderOptions) YarpRoute
methodWithTransformResponseHeaderRemove
Adds the transform which will remove the response header.
WithTransformResponseHeaderRemove(headerName string, options ...*WithTransformResponseHeaderRemoveOptions) YarpRoute
methodWithTransformResponseHeadersAllowed
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.
WithTransformResponseHeadersAllowed(allowedHeaders []string) YarpRoute
methodWithTransformResponseTrailer
Adds the transform which will append or set the response trailer.
WithTransformResponseTrailer(headerName string, value string, options ...*WithTransformResponseTrailerOptions) YarpRoute
methodWithTransformResponseTrailerRemove
Adds the transform which will remove the response trailer.
WithTransformResponseTrailerRemove(headerName string, options ...*WithTransformResponseTrailerRemoveOptions) YarpRoute
methodWithTransformResponseTrailersAllowed
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.
WithTransformResponseTrailersAllowed(allowedHeaders []string) YarpRoute
methodWithTransforms
Set the Transforms of the destination
WithTransforms(transforms []map[string]string) YarpRoute
methodWithTransformUseOriginalHostHeader
Adds the transform which will copy the incoming request Host header to the proxy request.
WithTransformUseOriginalHostHeader(options ...*WithTransformUseOriginalHostHeaderOptions) YarpRoute
methodWithTransformXForwarded
Adds the transform which will add X-Forwarded-* headers.
WithTransformXForwarded(options ...*WithTransformXForwardedOptions) YarpRoute