title: Removing headers from the response
body: <p>I need to cloak certain headers generated by ASP.NET and IIS and returned in the responses from a ASP.NET WebAPI service. The headers I need to cloak are:</p>
  
  <ul>
  <li>Server</li>
  <li>X-AspNet-Version</li>
  <li>X-AspNetMvc-Version</li>
  <li>X-Powered-By</li>
  </ul>
  
  <p>The service was earlier hosted in WCF, and the cloaking was done in an HttpModule by subscribing to PreSendRequestHeaders and manipulating HttpContext.Current.Response.Headers. With ASP.NET WebAPI everything is now task based, so HttpContext.Current is null. I tried to insert a message handler and manipulate the returned HttpResponseMessage, but the headers were not present on that stage. X-Powered-By can be removed in the IIS settings, but what is the suggested way to remove the rest of them?</p>