title: How to filter local requests in asp.net web api?
body: <p>I'm having a situation that is getting kind of annoying with asp.net web api. The thing is i have an API which is already in production, however I'm constantly making changing and deploying again.</p>
  
  <p>I have a filter, which takes care of checking if the request is https, that works awesome on production, but when requests are local the filter blocks all http requests, which is not what I want. I would like to allow local requests with http. I have a filter which does the exact same thing on MVC3, and I can do something like:</p>
  
  <pre><code>filterContext.HttpContext.Request.IsLocal
  </code></pre>
  
  <p>Is there any work around to this problem?</p>