Table of Contents

Class RouteMatch

Namespace
Yarp.ReverseProxy.Configuration
Assembly
Yarp.ReverseProxy.dll

Describes the matching criteria for a route.

public sealed record RouteMatch : IEquatable<RouteMatch>
Inheritance
RouteMatch
Implements
Inherited Members

Constructors

RouteMatch()

public RouteMatch()

Properties

Headers

Only match requests that contain all of these headers.

public IReadOnlyList<RouteHeader>? Headers { get; init; }

Property Value

IReadOnlyList<RouteHeader>

Hosts

Only match requests with the given Host header. Supports wildcards and ports. For unicode host names, do not use punycode.

public IReadOnlyList<string>? Hosts { get; init; }

Property Value

IReadOnlyList<string>

Methods

Only match requests that use these optional HTTP methods. E.g. GET, POST.

public IReadOnlyList<string>? Methods { get; init; }

Property Value

IReadOnlyList<string>

Path

Only match requests with the given Path pattern.

public string? Path { get; init; }

Property Value

string

QueryParameters

Only match requests that contain all of these query parameters.

public IReadOnlyList<RouteQueryParameter>? QueryParameters { get; init; }

Property Value

IReadOnlyList<RouteQueryParameter>

Methods

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(RouteMatch?)

public bool Equals(RouteMatch? other)

Parameters

other RouteMatch

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

<Clone>$()

public RouteMatch <Clone>$()

Returns

RouteMatch

Operators

operator ==(RouteMatch?, RouteMatch?)

public static bool operator ==(RouteMatch? left, RouteMatch? right)

Parameters

left RouteMatch
right RouteMatch

Returns

bool

operator !=(RouteMatch?, RouteMatch?)

public static bool operator !=(RouteMatch? left, RouteMatch? right)

Parameters

left RouteMatch
right RouteMatch

Returns

bool