I have created an API which gets a header value which it matches with the apikey from the web.config.
and the code to get the header value in the application is
var authToken = Request.Headers.Where(t => t.Key == "apiKey").ToList();
It works perfectly when I work with HTTP but when I use HTTPS it doesn't get the header value.
As shown in the image authToken.count = 0 which means it is not getting the header value.
The request object is of type public HttpRequestMessage Request { get; set; }
Can someone please suggest me where I am making the mistake.



