You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::ApiGatewayV2::Types::Cors

Inherits:
Struct
  • Object
show all
Defined in:
(unknown)

Overview

Note:

When passing Cors as input to an Aws::Client method, you can use a vanilla Hash:

{
  allow_credentials: false,
  allow_headers: ["__string"],
  allow_methods: ["StringWithLengthBetween1And64"],
  allow_origins: ["__string"],
  expose_headers: ["__string"],
  max_age: 1,
}

Represents a CORS configuration. Supported only for HTTP APIs. See Configuring CORS for more information.

Returned by:

Instance Attribute Summary collapse

Instance Attribute Details

#allow_credentialsBoolean

Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.

Returns:

  • (Boolean)

    Specifies whether credentials are included in the CORS request.

#allow_headersArray<String>

Represents a collection of allowed headers. Supported only for HTTP APIs.

Returns:

  • (Array<String>)

    Represents a collection of allowed headers.

#allow_methodsArray<String>

Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.

Returns:

  • (Array<String>)

    Represents a collection of allowed HTTP methods.

#allow_originsArray<String>

Represents a collection of allowed origins. Supported only for HTTP APIs.

Returns:

  • (Array<String>)

    Represents a collection of allowed origins.

#expose_headersArray<String>

Represents a collection of exposed headers. Supported only for HTTP APIs.

Returns:

  • (Array<String>)

    Represents a collection of exposed headers.

#max_ageInteger

The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.

Returns:

  • (Integer)

    The number of seconds that the browser should cache preflight request results.