Request headers are passed on from the front end to the app service the middleware configured adds some additional headers to the request, but when this reaches the hub via (Azure Signal service) only the front end headers are available. The headers that was added in the middleware are lost? My StartUp.cs looks like below
services.AddSignalR(
hubOptions =>
{
hubOptions.EnableDetailedErrors = true;
})
.AddAzureSignalR(config =>
{
config.Endpoints = new[]
{
new ServiceEndpoint(new Uri(Configuration.GetValue<string>("SignalRServiceUrl")),
new ManagedIdentityCredential(Configuration.GetValue<string>("AZURE_CLIENT_ID")))
};
});
and below is for middleware and hub
app.UseMiddleware<AddHeaderMiddleware>();
app.UseAzureSignalR(endpoints =>
{
endpoints.MapHub<TestHub>("/api/TestHub");
});