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
System.Object
RouteConfig
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 |
System.Nullable<System.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 |
System.Nullable<System.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 |
System.Nullable<System.String> |
|
|
Improve this Doc
View Source
Match
Parameters used to match requests.
This field is required.
Declaration
public RouteMatch Match { get; set; }
Property Value
|
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.
Note that this limit applies only to the YARP forwarder middleware, it does not apply when reading the request body from a custom middleware registered via
MapReverseProxy(IEndpointRouteBuilder, Action<IReverseProxyApplicationBuilder>).
Declaration
public long? MaxRequestBodySize { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Int64> |
|
|
Improve this Doc
View Source
Arbitrary key-value pairs that further describe this route.
Declaration
public IReadOnlyDictionary<string, string>? Metadata { get; set; }
Property Value
Type |
Description |
System.Nullable<IReadOnlyDictionary<System.String, System.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 |
System.Nullable<System.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 |
System.String |
|
|
Improve this Doc
View Source
Declaration
public IReadOnlyList<IReadOnlyDictionary<string, string>>? Transforms { get; set; }
Property Value
Type |
Description |
System.Nullable<IReadOnlyList<IReadOnlyDictionary<System.String, System.String>>> |
|
Methods
|
Improve this Doc
View Source
Equals(RouteConfig)
Declaration
public bool Equals(RouteConfig other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Implements
System.IEquatable<>
Extension Methods