Class: AWSCDK::CloudFront::CfnResponseHeadersPolicy::XSSProtectionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::CfnResponseHeadersPolicy::XSSProtectionProperty
- Defined in:
- cloud_front/cfn_response_headers_policy.rb
Overview
Determines whether CloudFront includes the X-XSS-Protection HTTP response header and the header's value.
For more information about the X-XSS-Protection HTTP response header, see X-XSS-Protection in the MDN Web Docs.
Instance Attribute Summary collapse
-
#mode_block ⇒ Boolean, ...
readonly
A Boolean that determines whether CloudFront includes the
mode=blockdirective in theX-XSS-Protectionheader. -
#override ⇒ Boolean, AWSCDK::IResolvable
readonly
A Boolean that determines whether CloudFront overrides the
X-XSS-ProtectionHTTP response header received from the origin with the one specified in this response headers policy. -
#protection ⇒ Boolean, AWSCDK::IResolvable
readonly
A Boolean that determines the value of the
X-XSS-ProtectionHTTP response header. -
#report_uri ⇒ String?
readonly
A reporting URI, which CloudFront uses as the value of the
reportdirective in theX-XSS-Protectionheader.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(override:, protection:, mode_block: nil, report_uri: nil) ⇒ XSSProtectionProperty
constructor
A new instance of XSSProtectionProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(override:, protection:, mode_block: nil, report_uri: nil) ⇒ XSSProtectionProperty
Returns a new instance of XSSProtectionProperty.
1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 |
# File 'cloud_front/cfn_response_headers_policy.rb', line 1440 def initialize(override:, protection:, mode_block: nil, report_uri: nil) @override = override Jsii::Type.check_type(@override, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "override") @protection = protection Jsii::Type.check_type(@protection, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "protection") @mode_block = mode_block Jsii::Type.check_type(@mode_block, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "modeBlock") unless @mode_block.nil? @report_uri = report_uri Jsii::Type.check_type(@report_uri, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "reportUri") unless @report_uri.nil? end |
Instance Attribute Details
#mode_block ⇒ Boolean, ... (readonly)
A Boolean that determines whether CloudFront includes the mode=block directive in the X-XSS-Protection header.
For more information about this directive, see X-XSS-Protection in the MDN Web Docs.
1471 1472 1473 |
# File 'cloud_front/cfn_response_headers_policy.rb', line 1471 def mode_block @mode_block end |
#override ⇒ Boolean, AWSCDK::IResolvable (readonly)
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.
1455 1456 1457 |
# File 'cloud_front/cfn_response_headers_policy.rb', line 1455 def override @override end |
#protection ⇒ Boolean, AWSCDK::IResolvable (readonly)
A Boolean that determines the value of the X-XSS-Protection HTTP response header.
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.
1464 1465 1466 |
# File 'cloud_front/cfn_response_headers_policy.rb', line 1464 def protection @protection end |
#report_uri ⇒ String? (readonly)
A reporting URI, which CloudFront uses as the value of the report directive in the X-XSS-Protection header.
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.
1480 1481 1482 |
# File 'cloud_front/cfn_response_headers_policy.rb', line 1480 def report_uri @report_uri end |
Class Method Details
.jsii_properties ⇒ Object
1482 1483 1484 1485 1486 1487 1488 1489 |
# File 'cloud_front/cfn_response_headers_policy.rb', line 1482 def self.jsii_properties { :override => "override", :protection => "protection", :mode_block => "modeBlock", :report_uri => "reportUri", } end |
Instance Method Details
#to_jsii ⇒ Object
1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 |
# File 'cloud_front/cfn_response_headers_policy.rb', line 1491 def to_jsii result = {} result.merge!({ "override" => @override, "protection" => @protection, "modeBlock" => @mode_block, "reportUri" => @report_uri, }) result.compact end |