@aws-cdk_aws-apigatewayv2-alpha.CorsHttpMethod
enum CorsHttpMethod
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Apigatewayv2.Alpha.CorsHttpMethod |
![]() | github.com/aws/aws-cdk-go/awscdkapigatewayv2alpha/v2#CorsHttpMethod |
![]() | software.amazon.awscdk.services.apigatewayv2.alpha.CorsHttpMethod |
![]() | aws_cdk.aws_apigatewayv2_alpha.CorsHttpMethod |
![]() | @aws-cdk/aws-apigatewayv2-alpha ยป CorsHttpMethod |
Supported CORS HTTP methods.
Example
new apigwv2.HttpApi(this, 'HttpProxyApi', {
corsPreflight: {
allowHeaders: ['Authorization'],
allowMethods: [
apigwv2.CorsHttpMethod.GET,
apigwv2.CorsHttpMethod.HEAD,
apigwv2.CorsHttpMethod.OPTIONS,
apigwv2.CorsHttpMethod.POST,
],
allowOrigins: ['*'],
maxAge: Duration.days(10),
},
});
Members
Name | Description |
---|---|
ANY | HTTP ANY. |
DELETE | HTTP DELETE. |
GET | HTTP GET. |
HEAD | HTTP HEAD. |
OPTIONS | HTTP OPTIONS. |
PATCH | HTTP PATCH. |
POST | HTTP POST. |
PUT | HTTP PUT. |
ANY
HTTP ANY.
DELETE
HTTP DELETE.
GET
HTTP GET.
HEAD
HTTP HEAD.
OPTIONS
HTTP OPTIONS.
PATCH
HTTP PATCH.
POST
HTTP POST.
PUT
HTTP PUT.