Class XFrameOptionsHeader
Represents the X-Frame-Options HTTP header.
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: IRM.AspNetCore.Http.Headers
Assembly: IRM.AspNetCore.Mvc.dll
Syntax
public class XFrameOptionsHeader : ISecurityHttpHeader, IHttpHeader
Remarks
For more information about the X-Frame-Options HTTP header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
Constructors
XFrameOptionsHeader(XFrameOptionsValues, String)
Creates a new instance of XFrameOptionsHeader.
Declaration
public XFrameOptionsHeader(XFrameOptionsValues value = XFrameOptionsValues.Deny, string allowFrom = null)
Parameters
XFrameOptionsValues
value
The value to be set for the X-Frame-Options HTTP header. |
String
allowFrom
The url to allow iframes from if AllowFrom is set as value. Chrome does not support AllowFrom. |
Properties
AllowFrom
Gets the url allowed from a single domain.
Declaration
public string AllowFrom { get; }
Property Value
String
|
Remarks
Chrome does not support the AllowFrom option.
Name
Gets the name of the HTTP header.
Declaration
public string Name { get; }
Property Value
String
|
Implements
Skip
Gets or sets if the security header should be skiped for a specific request.
Declaration
public bool Skip { get; set; }
Property Value
Boolean
|
Implements
Value
Gets the XFrameOptionsValues value for the header.
Declaration
public XFrameOptionsValues Value { get; }
Property Value
XFrameOptionsValues
|