YarpRouteExtensions
Class static net10.0
Provides extension methods for configuring a YARP destination
namespace Aspire.Hosting.Yarp;
public static class YarpRouteExtensions{ // ...} 11 members
Methods11
Section titled MethodsWithMatch(YarpRoute, RouteMatch)extension Set the parameters used to match requests.
WithMatchHeaders(YarpRoute, RouteHeader[])extension Only match requests that contain all of these headers.
WithMatchHosts(YarpRoute, string[])extension Only match requests with the given Host header. Supports wildcards and ports. For unicode host names, do not use punycode.
WithMatchMethods(YarpRoute, string[])extension Only match requests that use these optional HTTP methods. E.g. GET, POST.
WithMatchPath(YarpRoute, string)extension Only match requests with the given Path pattern.
WithMatchRouteQueryParameter(YarpRoute, RouteQueryParameter[])extension Only match requests that contain all of these query parameters.
WithMaxRequestBodySize(YarpRoute, long)extension Set the MaxRequestBodySize for the destination
WithMetadata(YarpRoute, IReadOnlyDictionary<string, string>)extension Set the Metadata of the destination
WithOrder(YarpRoute, int?)extension Set the order for the destination
WithTransform(YarpRoute, Action<IDictionary<string, string>>)extension Add a new transform to the destination
WithTransforms(YarpRoute, IReadOnlyList<IReadOnlyDictionary<string, string>>)extension Set the Transforms of the destination