Allow extending the new HttpContext in HttpConnectionDispatcher
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Is your feature request related to a problem? Please describe the problem.
The code already has a nice comment for the scenario
https://github.com/dotnet/aspnetcore/blob/v10.0.5/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionDispatcher.cs#L754-L755
I have a request pipeline that places a couple of features in the `HttpContext`, but within a SignalR method, these are not available on the one you get from `Context.GetHttpContext()`. As a workaround, I have placed the relevant data on the `.Items` instead, but it would've been great, if I was able to centrally control the creation of the new `HttpContext`.
### Describe the solution you'd like
As mentioned in the comment: A configurable callback, allowing me to extend what's available in the new `HttpContext`
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.