dotnet / dotnet/aspnetcore

Support Header matching in Endpoint Routing

Open
#21,157 8 comments 0 reactions 0 assignees View on GitHub
affected-medium area-middleware area-networking enhancement feature-yarp severity-major
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

### Is your feature request related to a problem? Please describe.
No. In the context of YARP, some routes must support header matching. If there is interest, I can submit a PR to contribute that here.

### Describe the solution you'd like
Our implementation handles the following:
* Match on the presence of a given header
* Match on a given value of a header (e.g. only match if header `x-example` has value `abc`, `def` or `ace`. Custom string comparison modes are supported)
* Match on a given prefix of a header value (e.g. only match if header `x-eample` starts with `abc`, `def` or `ace`. Custom string comparison modes are supported).

### Additional context
We have not implemented jump tables yet. We would hope the ASP .NET Core can take that on down the line if it seems relevant.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.