Allow matching routes without capturing arguments
Open
area-mvc
area-networking
enhancement
feature-routing
feature-yarp
Priority:1
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
For proxy scenarios where routes need to be parameterized for matching but not for capture support a syntax to avoid allocating anything after matching.
e.g.
```C#
// ProxyRequest is a made up method that proxies the HttpRequest to another server
endpoints.Map("/api/v1/{*path}", context =>
{
return context.ProxyRequest("http://localhost/old/" + context.Request.Path);
});
endpoints.Map("/api/v2/{*path}", context =>
{
return context.ProxyRequest("http://localhost/new/" + context.Request.Path);
});
```
cc @Tratcher
Contributor guide
Assessment
This issue has not been assessed yet.