Support adding and removing Kestrel endpoints with code
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
### Is your feature request related to a problem? Please describe.
This is a followup to #19376. Kestrel should support a programmatic API for adding and removing endpoints with code in addition to config.
For reference, here's how it looks with HttpSys:
https://github.com/dotnet/aspnetcore/blob/f6c89c2dc776060a5988f56f50c138220eaa129d/src/Servers/HttpSys/samples/HotAddSample/Startup.cs#L24-L41
### Describe the solution you'd like
We should probably have APIs similar to KestrelServerOptions.Listen* that work even after the server has started. We'll also need an API to query active endpoints and remove them. Perhaps IServerAddressesFeature could be leveraged for this.
Contributor guide
Assessment
This issue has not been assessed yet.