#[non_exhaustive]
pub struct ResponseHeadersPolicySecurityHeadersConfig { /* private fields */ }
Expand description

A configuration for a set of security-related HTTP response headers. CloudFront adds these headers to HTTP responses that it sends for requests that match a cache behavior associated with this response headers policy.

Implementations§

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.

Determines whether CloudFront includes the X-Frame-Options HTTP response header and the header’s value.

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

Determines whether CloudFront includes the Referrer-Policy HTTP response header and the header’s value.

For more information about the Referrer-Policy HTTP response header, see Referrer-Policy in the MDN Web Docs.

The policy directives and their values that CloudFront includes as values for the Content-Security-Policy HTTP response header.

For more information about the Content-Security-Policy HTTP response header, see Content-Security-Policy in the MDN Web Docs.

Determines whether CloudFront includes the X-Content-Type-Options HTTP response header with its value set to nosniff.

For more information about the X-Content-Type-Options HTTP response header, see X-Content-Type-Options in the MDN Web Docs.

Determines whether CloudFront includes the Strict-Transport-Security HTTP response header and the header’s value.

For more information about the Strict-Transport-Security HTTP response header, see Strict-Transport-Security in the MDN Web Docs.

Creates a new builder-style object to manufacture ResponseHeadersPolicySecurityHeadersConfig.

Examples found in repository?
src/xml_deser.rs (line 10608)
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
pub fn deser_structure_crate_model_response_headers_policy_security_headers_config(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
    crate::model::ResponseHeadersPolicySecurityHeadersConfig,
    aws_smithy_xml::decode::XmlDecodeError,
> {
    #[allow(unused_mut)]
    let mut builder = crate::model::ResponseHeadersPolicySecurityHeadersConfig::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("XSSProtection") /* XSSProtection com.amazonaws.cloudfront#ResponseHeadersPolicySecurityHeadersConfig$XSSProtection */ =>  {
                let var_425 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_response_headers_policy_xss_protection(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_xss_protection(var_425);
            }
            ,
            s if s.matches("FrameOptions") /* FrameOptions com.amazonaws.cloudfront#ResponseHeadersPolicySecurityHeadersConfig$FrameOptions */ =>  {
                let var_426 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_response_headers_policy_frame_options(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_frame_options(var_426);
            }
            ,
            s if s.matches("ReferrerPolicy") /* ReferrerPolicy com.amazonaws.cloudfront#ResponseHeadersPolicySecurityHeadersConfig$ReferrerPolicy */ =>  {
                let var_427 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_response_headers_policy_referrer_policy(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_referrer_policy(var_427);
            }
            ,
            s if s.matches("ContentSecurityPolicy") /* ContentSecurityPolicy com.amazonaws.cloudfront#ResponseHeadersPolicySecurityHeadersConfig$ContentSecurityPolicy */ =>  {
                let var_428 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_response_headers_policy_content_security_policy(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_content_security_policy(var_428);
            }
            ,
            s if s.matches("ContentTypeOptions") /* ContentTypeOptions com.amazonaws.cloudfront#ResponseHeadersPolicySecurityHeadersConfig$ContentTypeOptions */ =>  {
                let var_429 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_response_headers_policy_content_type_options(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_content_type_options(var_429);
            }
            ,
            s if s.matches("StrictTransportSecurity") /* StrictTransportSecurity com.amazonaws.cloudfront#ResponseHeadersPolicySecurityHeadersConfig$StrictTransportSecurity */ =>  {
                let var_430 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_response_headers_policy_strict_transport_security(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_strict_transport_security(var_430);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more