Skip to content
Docs Try Aspire

YarpRouteExtensions

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