@Stability(value=Stable)
public static interface CfnResponseHeadersPolicy.XSSProtectionProperty
extends software.amazon.jsii.JsiiSerializable
For more information about the X-XSS-Protection HTTP response header, see X-XSS-Protection in the MDN Web Docs.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudfront.*;
XSSProtectionProperty xSSProtectionProperty = XSSProtectionProperty.builder()
.override(false)
.protection(false)
// the properties below are optional
.modeBlock(false)
.reportUri("reportUri")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnResponseHeadersPolicy.XSSProtectionProperty.Builder
A builder for
CfnResponseHeadersPolicy.XSSProtectionProperty |
static class |
CfnResponseHeadersPolicy.XSSProtectionProperty.Jsii$Proxy
An implementation for
CfnResponseHeadersPolicy.XSSProtectionProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnResponseHeadersPolicy.XSSProtectionProperty.Builder |
builder() |
default Object |
getModeBlock()
A Boolean that determines whether CloudFront includes the `mode=block` directive in the `X-XSS-Protection` header.
|
Object |
getOverride()
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.
|
Object |
getProtection()
A Boolean that determines the value of the `X-XSS-Protection` HTTP response header.
|
default String |
getReportUri()
A reporting URI, which CloudFront uses as the value of the `report` directive in the `X-XSS-Protection` header.
|
@Stability(value=Stable) @NotNull Object getOverride()
@Stability(value=Stable) @NotNull Object getProtection()
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.
@Stability(value=Stable) @Nullable default Object getModeBlock()
For more information about this directive, see X-XSS-Protection in the MDN Web Docs.
@Stability(value=Stable) @Nullable default String getReportUri()
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.
@Stability(value=Stable) static CfnResponseHeadersPolicy.XSSProtectionProperty.Builder builder()
Copyright © 2022. All rights reserved.