So I my app chanced authentication Management, previously all headers were added in a load balancer. The new method works and in order to not have to rewrite code we are using an angular interceptor to inject the headers in the HTTP request there
HttpContext.Current.Response.AddHeader("ICAM_RIOT", "RIOT");
private void hasResponseHeaderCollection(string headerName, string Value)
{
if (!HttpContext.Current.Response.Headers.AllKeys.Any(k => string.Equals(k, headerName)))
{
HttpContext.Current.Response.AddHeader(headerName, Value);
}
}
private string GetHeaderStringValue(string headerName)
{
return HttpContext.Current.Request.Headers[headerName] ?? "";
}
Please see the photos,
All the headers are UPPER CASE
WHEN received on the .Net api side they are camel Case
For instance ICAM_MAIL becomes Icam_mail
I even tried on the .net side to add a rseponse header all caps and it comes back camel case as well