CorsPreflightOptions

class aws_cdk.aws_apigatewayv2.CorsPreflightOptions(*, allow_credentials=None, allow_headers=None, allow_methods=None, allow_origins=None, expose_headers=None, max_age=None)

Bases: object

(experimental) Options for the CORS Configuration.

Parameters
  • allow_credentials (Optional[bool]) – (experimental) Specifies whether credentials are included in the CORS request. Default: false

  • allow_headers (Optional[Sequence[str]]) – (experimental) Represents a collection of allowed headers. Default: - No Headers are allowed.

  • allow_methods (Optional[Sequence[CorsHttpMethod]]) – (experimental) Represents a collection of allowed HTTP methods. Default: - No Methods are allowed.

  • allow_origins (Optional[Sequence[str]]) – (experimental) Represents a collection of allowed origins. Default: - No Origins are allowed.

  • expose_headers (Optional[Sequence[str]]) – (experimental) Represents a collection of exposed headers. Default: - No Expose Headers are allowed.

  • max_age (Optional[Duration]) – (experimental) The duration that the browser should cache preflight request results. Default: Duration.seconds(0)

Stability

experimental

Attributes

allow_credentials

(experimental) Specifies whether credentials are included in the CORS request.

Default

false

Stability

experimental

Return type

Optional[bool]

allow_headers

(experimental) Represents a collection of allowed headers.

Default
  • No Headers are allowed.

Stability

experimental

Return type

Optional[List[str]]

allow_methods

(experimental) Represents a collection of allowed HTTP methods.

Default
  • No Methods are allowed.

Stability

experimental

Return type

Optional[List[CorsHttpMethod]]

allow_origins

(experimental) Represents a collection of allowed origins.

Default
  • No Origins are allowed.

Stability

experimental

Return type

Optional[List[str]]

expose_headers

(experimental) Represents a collection of exposed headers.

Default
  • No Expose Headers are allowed.

Stability

experimental

Return type

Optional[List[str]]

max_age

(experimental) The duration that the browser should cache preflight request results.

Default

Duration.seconds(0)

Stability

experimental

Return type

Optional[Duration]