@aws-cdk_aws-apigatewayv2-alpha.CorsHttpMethod

enum CorsHttpMethod ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Apigatewayv2.Alpha.CorsHttpMethod
Gogithub.com/aws/aws-cdk-go/awscdkapigatewayv2alpha/v2#CorsHttpMethod
Javasoftware.amazon.awscdk.services.apigatewayv2.alpha.CorsHttpMethod
Pythonaws_cdk.aws_apigatewayv2_alpha.CorsHttpMethod
TypeScript (source)@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

NameDescription
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.