Show / Hide Table of Contents

Class RouteConfig

Describes a route that matches incoming requests based on the Match criteria and proxies matching requests to the cluster identified by its ClusterId.

Inheritance
Object
RouteConfig
Implements
IEquatable<RouteConfig>
Namespace: Yarp.ReverseProxy.Configuration
Assembly: Yarp.ReverseProxy.dll
Syntax
public sealed class RouteConfig : object

Properties

| Improve this Doc View Source

AuthorizationPolicy

The name of the AuthorizationPolicy to apply to this route. If not set then only the FallbackPolicy will apply. Set to "Default" to enable authorization with the applications default policy. Set to "Anonymous" to disable all authorization checks for this route.

Declaration
public string? AuthorizationPolicy { get; set; }
Property Value
Type Description
Nullable<String>
| Improve this Doc View Source

ClusterId

Gets or sets the cluster that requests matching this route should be proxied to.

Declaration
public string? ClusterId { get; set; }
Property Value
Type Description
Nullable<String>
| Improve this Doc View Source

CorsPolicy

The name of the CorsPolicy to apply to this route. If not set then the route won't be automatically matched for cors preflight requests. Set to "Default" to enable cors with the default policy. Set to "Disable" to refuses cors requests for this route.

Declaration
public string? CorsPolicy { get; set; }
Property Value
Type Description
Nullable<String>
| Improve this Doc View Source

Match

Parameters used to match requests. This field is required.

Declaration
public RouteMatch Match { get; set; }
Property Value
Type Description
RouteMatch
| Improve this Doc View Source

MaxRequestBodySize

An optional override for how large request bodies can be in bytes. If set, this overrides the server's default (30MB) per request. Set to '-1' to disable the limit for this route.

Declaration
public long? MaxRequestBodySize { get; set; }
Property Value
Type Description
Nullable<Int64>
| Improve this Doc View Source

Metadata

Arbitrary key-value pairs that further describe this route.

Declaration
public IReadOnlyDictionary<string, string>? Metadata { get; set; }
Property Value
Type Description
Nullable<IReadOnlyDictionary<String, String>>
| Improve this Doc View Source

Order

Optionally, an order value for this route. Routes with lower numbers take precedence over higher numbers.

Declaration
public int? Order { get; set; }
Property Value
Type Description
Nullable<Int32>
| Improve this Doc View Source

RouteId

Globally unique identifier of the route. This field is required.

Declaration
public string RouteId { get; set; }
Property Value
Type Description
String
| Improve this Doc View Source

Transforms

Parameters used to transform the request and response. See ITransformBuilder.

Declaration
public IReadOnlyList<IReadOnlyDictionary<string, string>>? Transforms { get; set; }
Property Value
Type Description
Nullable<IReadOnlyList<IReadOnlyDictionary<String, String>>>

Methods

| Improve this Doc View Source

Equals(RouteConfig)

Declaration
public bool Equals(RouteConfig other)
Parameters
Type Name Description
RouteConfig other
Returns
Type Description
Boolean
| Improve this Doc View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32

Implements

System.IEquatable<T>

Extension Methods

ForwardedTransformExtensions.WithTransformXForwarded(RouteConfig, String, ForwardedTransformActions, Nullable<ForwardedTransformActions>, Nullable<ForwardedTransformActions>, Nullable<ForwardedTransformActions>, Nullable<ForwardedTransformActions>)
ForwardedTransformExtensions.WithTransformForwarded(RouteConfig, Boolean, Boolean, NodeFormat, NodeFormat, ForwardedTransformActions)
ForwardedTransformExtensions.WithTransformClientCertHeader(RouteConfig, String)
HttpMethodTransformExtensions.WithTransformHttpMethodChange(RouteConfig, String, String)
PathTransformExtensions.WithTransformPathSet(RouteConfig, PathString)
PathTransformExtensions.WithTransformPathPrefix(RouteConfig, PathString)
PathTransformExtensions.WithTransformPathRemovePrefix(RouteConfig, PathString)
PathTransformExtensions.WithTransformPathRouteValues(RouteConfig, PathString)
QueryTransformExtensions.WithTransformQueryValue(RouteConfig, String, String, Boolean)
QueryTransformExtensions.WithTransformQueryRouteValue(RouteConfig, String, String, Boolean)
QueryTransformExtensions.WithTransformQueryRemoveKey(RouteConfig, String)
RequestHeadersTransformExtensions.WithTransformCopyRequestHeaders(RouteConfig, Boolean)
RequestHeadersTransformExtensions.WithTransformUseOriginalHostHeader(RouteConfig, Boolean)
RequestHeadersTransformExtensions.WithTransformRequestHeader(RouteConfig, String, String, Boolean)
RequestHeadersTransformExtensions.WithTransformRequestHeaderRemove(RouteConfig, String)
RequestHeadersTransformExtensions.WithTransformRequestHeadersAllowed(RouteConfig, String[])
ResponseTransformExtensions.WithTransformCopyResponseHeaders(RouteConfig, Boolean)
ResponseTransformExtensions.WithTransformCopyResponseTrailers(RouteConfig, Boolean)
ResponseTransformExtensions.WithTransformResponseHeader(RouteConfig, String, String, Boolean, ResponseCondition)
ResponseTransformExtensions.WithTransformResponseHeaderRemove(RouteConfig, String, ResponseCondition)
ResponseTransformExtensions.WithTransformResponseHeadersAllowed(RouteConfig, String[])
ResponseTransformExtensions.WithTransformResponseTrailer(RouteConfig, String, String, Boolean, ResponseCondition)
ResponseTransformExtensions.WithTransformResponseTrailerRemove(RouteConfig, String, ResponseCondition)
ResponseTransformExtensions.WithTransformResponseTrailersAllowed(RouteConfig, String[])
RouteConfigTransformExtensions.WithTransform(RouteConfig, Action<IDictionary<String, String>>)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX