Class CfnResponseHeadersPolicy.XSSProtectionProperty
Determines whether CloudFront includes the X-XSS-Protection
HTTP response header and the header's value.
Inheritance
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class XSSProtectionProperty : Object, CfnResponseHeadersPolicy.IXSSProtectionProperty
Syntax (vb)
Public Class XSSProtectionProperty
Inherits Object
Implements CfnResponseHeadersPolicy.IXSSProtectionProperty
Remarks
For more information about the X-XSS-Protection
HTTP response header, see X-XSS-Protection in the MDN Web Docs.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudFront;
var xSSProtectionProperty = new XSSProtectionProperty {
Override = false,
Protection = false,
// the properties below are optional
ModeBlock = false,
ReportUri = "reportUri"
};
Synopsis
Constructors
XSSProtectionProperty() |
Properties
ModeBlock | A Boolean that determines whether CloudFront includes the |
Override | A Boolean that determines whether CloudFront overrides the |
Protection | A Boolean that determines the value of the |
ReportUri | A reporting URI, which CloudFront uses as the value of the |
Constructors
XSSProtectionProperty()
public XSSProtectionProperty()
Properties
ModeBlock
A Boolean that determines whether CloudFront includes the mode=block
directive in the X-XSS-Protection
header.
public object ModeBlock { get; set; }
Property Value
System.Object
Remarks
For more information about this directive, see X-XSS-Protection in the MDN Web Docs.
Override
A Boolean that determines whether CloudFront overrides the X-XSS-Protection
HTTP response header received from the origin with the one specified in this response headers policy.
public object Override { get; set; }
Property Value
System.Object
Remarks
Protection
A Boolean that determines the value of the X-XSS-Protection
HTTP response header.
public object Protection { get; set; }
Property Value
System.Object
Remarks
When this setting is true
, the value of the X-XSS-Protection
header is 1
. When this setting is false
, the value of the X-XSS-Protection
header is 0
.
For more information about these settings, see X-XSS-Protection in the MDN Web Docs.
ReportUri
A reporting URI, which CloudFront uses as the value of the report
directive in the X-XSS-Protection
header.
public string ReportUri { get; set; }
Property Value
System.String
Remarks
You cannot specify a ReportUri
when ModeBlock
is true
.
For more information about using a reporting URL, see X-XSS-Protection in the MDN Web Docs.