AWS::ApiGatewayV2::Api Cors
The Cors
property specifies a CORS configuration for an API.
Supported only for HTTP APIs. See Configuring CORS for more information.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "AllowCredentials" :
Boolean
, "AllowHeaders" :[ String, ... ]
, "AllowMethods" :[ String, ... ]
, "AllowOrigins" :[ String, ... ]
, "ExposeHeaders" :[ String, ... ]
, "MaxAge" :Integer
}
YAML
AllowCredentials:
Boolean
AllowHeaders:- String
AllowMethods:- String
AllowOrigins:- String
ExposeHeaders:- String
MaxAge:Integer
Properties
AllowCredentials
-
Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.
Required: No
Type: Boolean
Update requires: No interruption
AllowHeaders
-
Represents a collection of allowed headers. Supported only for HTTP APIs.
Required: No
Type: Array of String
Update requires: No interruption
AllowMethods
-
Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.
Required: No
Type: Array of String
Update requires: No interruption
AllowOrigins
-
Represents a collection of allowed origins. Supported only for HTTP APIs.
Required: No
Type: Array of String
Update requires: No interruption
ExposeHeaders
-
Represents a collection of exposed headers. Supported only for HTTP APIs.
Required: No
Type: Array of String
Update requires: No interruption
MaxAge
-
The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.
Required: No
Type: Integer
Update requires: No interruption