Show / Hide Table of Contents

Class CfnResponseHeadersPolicy.XSSProtectionProperty

Determines whether CloudFront includes the X-XSS-Protection HTTP response header and the header's value.

Inheritance
object
CfnResponseHeadersPolicy.XSSProtectionProperty
Implements
CfnResponseHeadersPolicy.IXSSProtectionProperty
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnResponseHeadersPolicy.XSSProtectionProperty : CfnResponseHeadersPolicy.IXSSProtectionProperty
Syntax (vb)
Public Class CfnResponseHeadersPolicy.XSSProtectionProperty Implements CfnResponseHeadersPolicy.IXSSProtectionProperty
Remarks

For more information about the X-XSS-Protection HTTP response header, see X-XSS-Protection in the MDN Web Docs.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-responseheaderspolicy-xssprotection.html

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()

Determines whether CloudFront includes the X-XSS-Protection HTTP response header and the header's value.

Properties

ModeBlock

A Boolean that determines whether CloudFront includes the mode=block directive in the X-XSS-Protection header.

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.

Protection

A Boolean that determines the value of the X-XSS-Protection HTTP response header.

ReportUri

A reporting URI, which CloudFront uses as the value of the report directive in the X-XSS-Protection header.

Constructors

XSSProtectionProperty()

Determines whether CloudFront includes the X-XSS-Protection HTTP response header and the header's value.

public XSSProtectionProperty()
Remarks

For more information about the X-XSS-Protection HTTP response header, see X-XSS-Protection in the MDN Web Docs.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-responseheaderspolicy-xssprotection.html

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"
             };

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

object

Remarks

For more information about this directive, see X-XSS-Protection in the MDN Web Docs.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-responseheaderspolicy-xssprotection.html#cfn-cloudfront-responseheaderspolicy-xssprotection-modeblock

Type union: either bool or IResolvable

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

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-responseheaderspolicy-xssprotection.html#cfn-cloudfront-responseheaderspolicy-xssprotection-override

Type union: either bool or IResolvable

Protection

A Boolean that determines the value of the X-XSS-Protection HTTP response header.

public object Protection { get; set; }
Property Value

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.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-responseheaderspolicy-xssprotection.html#cfn-cloudfront-responseheaderspolicy-xssprotection-protection

Type union: either bool or IResolvable

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

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.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-responseheaderspolicy-xssprotection.html#cfn-cloudfront-responseheaderspolicy-xssprotection-reporturi

Implements

CfnResponseHeadersPolicy.IXSSProtectionProperty
Back to top Generated by DocFX