MapHost endpoint routing
Open
affected-few
api-suggestion
area-minimal
area-mvc
enhancement
feature-routing
severity-nice-to-have
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
### Describe the bug
In endpoint routing today routes are defined around paths. There's an additional constraint you can add for a host, but only after already defining a path. Instead what I want to do is map all requests to a specific host as the primary pivot. This can be done today but it is inelegant (I have to define a catch-all route), and in-efficient (route values would still be extracted).
### To Reproduce
Here's what I have to write today:
``` C#
endpoints.Map("/{**path}", handler).RequireHost(host);
```
Proposal:
``` C#
endpoints.MapHost(host, handler);
```
Contributor guide
Assessment
This issue has not been assessed yet.