Created
April 29, 2019 13:47
-
-
Save aykuttasil/ae2f921f38f8a2222b73b27c82e12ae7 to your computer and use it in GitHub Desktop.
ResultFilterAttribute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Microsoft.AspNetCore.Mvc.Filters; | |
namespace aspnetcore_filter.Filters | |
{ | |
public class ResultFilterSampleAttribute : ResultFilterAttribute | |
{ | |
override public void OnResultExecuting(ResultExecutingContext context) | |
{ | |
context.HttpContext.Response.Headers.Add("Author", "Aykut Asil"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment