Skip to content

Commit

Permalink
Merge branch 'main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
biffgaut authored Oct 12, 2021
2 parents 059ad93 + e10394d commit ac352b2
Show file tree
Hide file tree
Showing 32 changed files with 1,032 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ _Parameters_
| **Name** | **Type** | **Description** |
|:-------------|:----------------|-----------------|
|existingApiGatewayObj|[`api.RestApi`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-apigateway.RestApi.html)|The regional API Gateway that will be fronted with the CloudFront|
|cloudFrontDistributionProps?|[`cloudfront.DistributionProps | any`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudfront.DistributionProps.html)|Optional user provided props to override the default props for CloudFront Distribution|
|cloudFrontDistributionProps?|[`cloudfront.DistributionProps \| any`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudfront.DistributionProps.html)|Optional user provided props to override the default props for CloudFront Distribution|
|insertHttpSecurityHeaders?|`boolean`|Optional user provided props to turn on/off the automatic injection of best practice HTTP security headers in all responses from CloudFront|
|cloudFrontLoggingBucketProps?|[`s3.BucketProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.BucketProps.html)|Optional user provided props to override the default props for the CloudFront Logging Bucket.|

## Pattern Properties

| **Name** | **Type** | **Description** |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ export interface CloudFrontToApiGatewayProps {
* @default - true
*/
readonly insertHttpSecurityHeaders?: boolean;
/**
* Optional user provided props to override the default props for the CloudFront Logging Bucket.
*
* @default - Default props are used
*/
readonly cloudFrontLoggingBucketProps?: s3.BucketProps
}

export class CloudFrontToApiGateway extends Construct {
Expand All @@ -65,6 +71,6 @@ export class CloudFrontToApiGateway extends Construct {

[this.cloudFrontWebDistribution, this.cloudFrontFunction, this.cloudFrontLoggingBucket] =
defaults.CloudFrontDistributionForApiGateway(this, props.existingApiGatewayObj,
props.cloudFrontDistributionProps, props.insertHttpSecurityHeaders);
props.cloudFrontDistributionProps, props.insertHttpSecurityHeaders, props.cloudFrontLoggingBucketProps);
}
}
Loading

0 comments on commit ac352b2

Please sign in to comment.