title: How to check the HTTP header value before entering a controller using an attribute?
body: <p>I am trying to check if the http header contains a specific value and then perform some operations on it. I could write a method for this but I was wondering if I could do this using an attribute. Something like:</p>
  
  <pre><code>[CheckHeader("SomeValue")]
  public IHttpActionResult MyController()
  {
      //do stuff
  }
  </code></pre>
  
  <p>Also, is there a way I could prevent the controller from being run depending on the header value?</p>