Created
September 30, 2014 08:40
-
-
Save sebnilsson/81e092518aa5bd8a6751 to your computer and use it in GitHub Desktop.
ASP.NET MVC: X-Frame-Options ALLOWALL
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
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] | |
public class SuppressXFrameOptionsHeaderAttribute : ActionFilterAttribute | |
{ | |
public override void OnResultExecuted(ResultExecutedContext filterContext) | |
{ | |
filterContext.HttpContext.Response.Headers.Set("X-Frame-Options", "ALLOWALL"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment