Class: Aws::CloudFront::Types::ResponseHeadersPolicyConfig

Inherits:
Struct
  • Object
show all
Includes:
Structure
Defined in:
lib/aws-sdk-cloudfront/types.rb

Overview

Note:

When making an API call, you may pass ResponseHeadersPolicyConfig data as a hash:

{
  comment: "string",
  name: "string", # required
  cors_config: {
    access_control_allow_origins: { # required
      quantity: 1, # required
      items: ["string"], # required
    },
    access_control_allow_headers: { # required
      quantity: 1, # required
      items: ["string"], # required
    },
    access_control_allow_methods: { # required
      quantity: 1, # required
      items: ["GET"], # required, accepts GET, POST, OPTIONS, PUT, DELETE, PATCH, HEAD, ALL
    },
    access_control_allow_credentials: false, # required
    access_control_expose_headers: {
      quantity: 1, # required
      items: ["string"],
    },
    access_control_max_age_sec: 1,
    origin_override: false, # required
  },
  security_headers_config: {
    xss_protection: {
      override: false, # required
      protection: false, # required
      mode_block: false,
      report_uri: "string",
    },
    frame_options: {
      override: false, # required
      frame_option: "DENY", # required, accepts DENY, SAMEORIGIN
    },
    referrer_policy: {
      override: false, # required
      referrer_policy: "no-referrer", # required, accepts no-referrer, no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url
    },
    content_security_policy: {
      override: false, # required
      content_security_policy: "string", # required
    },
    content_type_options: {
      override: false, # required
    },
    strict_transport_security: {
      override: false, # required
      include_subdomains: false,
      preload: false,
      access_control_max_age_sec: 1, # required
    },
  },
  custom_headers_config: {
    quantity: 1, # required
    items: [
      {
        header: "string", # required
        value: "string", # required
        override: false, # required
      },
    ],
  },
  server_timing_headers_config: {
    enabled: false, # required
    sampling_rate: 1.0,
  },
}

A response headers policy configuration.

A response headers policy configuration contains metadata about the response headers policy, and configurations for sets of HTTP response headers and their values. CloudFront adds the headers in the policy to HTTP responses that it sends for requests that match a cache behavior associated with the policy.

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#commentString

A comment to describe the response headers policy.

The comment cannot be longer than 128 characters.

Returns:

  • (String)

11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
# File 'lib/aws-sdk-cloudfront/types.rb', line 11720

class ResponseHeadersPolicyConfig < Struct.new(
  :comment,
  :name,
  :cors_config,
  :security_headers_config,
  :custom_headers_config,
  :server_timing_headers_config)
  SENSITIVE = []
  include Aws::Structure
end

#cors_configTypes::ResponseHeadersPolicyCorsConfig

A configuration for a set of HTTP response headers that are used for cross-origin resource sharing (CORS).


11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
# File 'lib/aws-sdk-cloudfront/types.rb', line 11720

class ResponseHeadersPolicyConfig < Struct.new(
  :comment,
  :name,
  :cors_config,
  :security_headers_config,
  :custom_headers_config,
  :server_timing_headers_config)
  SENSITIVE = []
  include Aws::Structure
end

#custom_headers_configTypes::ResponseHeadersPolicyCustomHeadersConfig

A configuration for a set of custom HTTP response headers.


11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
# File 'lib/aws-sdk-cloudfront/types.rb', line 11720

class ResponseHeadersPolicyConfig < Struct.new(
  :comment,
  :name,
  :cors_config,
  :security_headers_config,
  :custom_headers_config,
  :server_timing_headers_config)
  SENSITIVE = []
  include Aws::Structure
end

#nameString

A name to identify the response headers policy.

The name must be unique for response headers policies in this Amazon Web Services account.

Returns:

  • (String)

11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
# File 'lib/aws-sdk-cloudfront/types.rb', line 11720

class ResponseHeadersPolicyConfig < Struct.new(
  :comment,
  :name,
  :cors_config,
  :security_headers_config,
  :custom_headers_config,
  :server_timing_headers_config)
  SENSITIVE = []
  include Aws::Structure
end

#security_headers_configTypes::ResponseHeadersPolicySecurityHeadersConfig

A configuration for a set of security-related HTTP response headers.


11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
# File 'lib/aws-sdk-cloudfront/types.rb', line 11720

class ResponseHeadersPolicyConfig < Struct.new(
  :comment,
  :name,
  :cors_config,
  :security_headers_config,
  :custom_headers_config,
  :server_timing_headers_config)
  SENSITIVE = []
  include Aws::Structure
end

#server_timing_headers_configTypes::ResponseHeadersPolicyServerTimingHeadersConfig

A configuration for enabling the `Server-Timing` header in HTTP responses sent from CloudFront.


11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
# File 'lib/aws-sdk-cloudfront/types.rb', line 11720

class ResponseHeadersPolicyConfig < Struct.new(
  :comment,
  :name,
  :cors_config,
  :security_headers_config,
  :custom_headers_config,
  :server_timing_headers_config)
  SENSITIVE = []
  include Aws::Structure
end