title: Add header to response base on status code
body: <p>I'm trying to add a headers to response base on status code.
  I used a ActionFilterAttribute, but OnResultExecuting method always return the status OK, becasue response didnt start yet.
  And I could not add a header to OnResultExecuted because we culd not modify response.
  Any idea where i can add a header?</p>
  
  <pre><code>public override void OnResultExecuting(ResultExecutingContext context)
      {
          var httpContext = context.HttpContext;
  
          if (context.HttpContext.Response.StatusCode == Microsoft.AspNetCore.Http.StatusCodes.Status200OK)  // doesnt work since it is always 200
          {
              httpContext.Response.Headers.Add("flag1", "false");
  </code></pre>