Class XFrameOptionsAttribute
Action filter for setting X-Frame-Options header value.
Inheritance
System.Object
XFrameOptionsAttribute
Namespace: Lib.AspNetCore.Mvc.Security.Filters
Assembly: Lib.AspNetCore.Mvc.Security.dll
Syntax
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class XFrameOptionsAttribute : ActionFilterAttribute
Constructors
XFrameOptionsAttribute(XFrameOptionsDirectives)
Instantiates a new XFrameOptionsAttribute.
Declaration
public XFrameOptionsAttribute(XFrameOptionsDirectives directive)
Parameters
Type | Name | Description |
---|---|---|
XFrameOptionsDirectives | directive | The directive. |
XFrameOptionsAttribute(String)
Instantiates a new XFrameOptionsAttribute with AllowFrom directive.
Declaration
public XFrameOptionsAttribute(string origin)
Parameters
Type | Name | Description |
---|---|---|
System.String | origin | The serialized origin. |
Properties
Origin
Gets or sets the serialized origin for AllowFrom directive.
Declaration
public string Origin { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
OnActionExecuted(ActionExecutedContext)
Called after the action method executes.
Declaration
public override void OnActionExecuted(ActionExecutedContext context)
Parameters
Type | Name | Description |
---|---|---|
ActionExecutedContext | context | The context. |