jxycms
11/14/2019 - 12:08 PM

verify request header value

Request.Headers.TryGetValue("some-header-name", out var headers);         
if(headers.Count > 1 || string.IsNullOrWhiteSpace(headers.FirstOrDefault())){
   return new UnauthorizedResult();
}